@promind/honey 1.47.0 → 1.47.13

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 (3) hide show
  1. package/README.md +275 -29
  2. package/package.json +2 -2
  3. package/CHANGELOG.md +0 -749
package/README.md CHANGED
@@ -9,6 +9,9 @@ A TypeScript-based Node.js declarative library for building RESTful APIs with se
9
9
  - [Installation](#installation)
10
10
  - [Quick Start](#quick-start)
11
11
  - [Configuration](#configuration)
12
+ - [Database Connection](#database-connection)
13
+ - [Environment Variables](#environment-variables)
14
+ - [Built-in Defaults](#built-in-defaults)
12
15
  - [API Reference](#api-reference)
13
16
  - [Core Methods](#core-methods)
14
17
  - [CRUD Operations](#crud-operations)
@@ -32,7 +35,7 @@ A TypeScript-based Node.js declarative library for building RESTful APIs with se
32
35
  - **TypeScript Ready**: Full TypeScript support with comprehensive type definitions
33
36
  - **Validation**: Request validation using Joi
34
37
  - **Error Handling**: Consistent error handling and response formatting
35
- - **Swagger Documentation**: Automatic OpenAPI documentation generation
38
+ - **API Documentation**: Automatic OpenAPI documentation is generated internally via `express-oas-generator`.
36
39
 
37
40
  ## Prerequisites
38
41
 
@@ -104,7 +107,7 @@ honey.deleteById({
104
107
  honey.startServer();
105
108
  ```
106
109
 
107
- 2. Run your server:
110
+ 1. Run your server:
108
111
 
109
112
  ```bash
110
113
  # If using TypeScript
@@ -156,6 +159,15 @@ import { createHoney } from '@promind/honey';
156
159
  const honey = createHoney(process.env.PORT, process.env.DB_URI);
157
160
  ```
158
161
 
162
+ ### Built-in Defaults
163
+
164
+ HoneyJS automatically configures the following on startup:
165
+
166
+ - **CORS**: Enabled for all origins (`*`) with all methods and headers allowed
167
+ - **Body parsing**: JSON and URL-encoded bodies up to 50MB
168
+ - **Cookie parsing**: Enabled via `cookie-parser`
169
+ - **Route prefix**: `/api` (configurable via `metadata.routePrefix`)
170
+
159
171
  ## API Reference
160
172
 
161
173
  ### Core Methods
@@ -180,12 +192,18 @@ Starts the HTTP server.
180
192
 
181
193
  Adds global middleware to all routes.
182
194
 
195
+ #### `honey.db`
196
+
197
+ Exposes the underlying Sequelize instance for direct database access.
198
+
183
199
  ### CRUD Operations
184
200
 
185
201
  #### `honey.create(options)`
186
202
 
187
203
  Creates a POST endpoint for creating new resources.
188
204
 
205
+ The response `data` field contains `{ id }` (the inserted record's ID) by default unless `processResponseData` is provided.
206
+
189
207
  ```typescript
190
208
  honey.create({
191
209
  resource: 'posts', // Resource name (used in URL path)
@@ -202,10 +220,13 @@ honey.create({
202
220
  message: 'Post created', // Success message
203
221
  pathOverride: '/blog/posts', // Optional: Custom path
204
222
  middleware: [authMiddleware], // Optional: Route-specific middleware
223
+ exitMiddleware: [auditMiddleware], // Optional: Middleware that runs after response is sent
224
+ methodOverride: 'post', // Optional: Override the HTTP method
205
225
  processResponseData: (data, req) => {
206
226
  // Optional: Transform response data
207
227
  return { ...data, extra: 'info' };
208
- }
228
+ },
229
+ processErrorResponse: (err) => err // Optional: Customize error response
209
230
  });
210
231
  ```
211
232
 
@@ -213,6 +234,22 @@ honey.create({
213
234
 
214
235
  Creates a GET endpoint for retrieving a list of resources.
215
236
 
237
+ Automatically supports `?page=` and `?limit=` query parameters for pagination. The response shape is:
238
+
239
+ ```json
240
+ {
241
+ "data": [...],
242
+ "meta": {
243
+ "pagination": {
244
+ "total": 100,
245
+ "pageSize": 10,
246
+ "page": 1,
247
+ "pageCount": 10
248
+ }
249
+ }
250
+ }
251
+ ```
252
+
216
253
  ```typescript
217
254
  honey.get({
218
255
  resource: 'posts',
@@ -221,12 +258,18 @@ honey.get({
221
258
  // Optional: Query filters
222
259
  title: {
223
260
  operator: 'like', // Filter operator
224
- value: 'string' // Parameter type
261
+ value: 'string', // Parameter type
262
+ location: 'query' // Optional: where to read the value from (default: query string)
225
263
  },
226
264
  published: {
227
265
  operator: '=',
228
266
  value: 'boolean'
229
267
  },
268
+ author_id: {
269
+ operator: '=',
270
+ value: 'number',
271
+ overrideValue: (req) => req.user?.id // Dynamic value based on request
272
+ },
230
273
  $or: {
231
274
  // Logical OR condition
232
275
  title: {
@@ -243,10 +286,39 @@ honey.get({
243
286
  // Optional: Sorting
244
287
  sort: 'DESC', // ASC or DESC
245
288
  sortField: 'created_at' // Field to sort by
246
- }
289
+ },
290
+ joins: [
291
+ // Optional: SQL joins
292
+ {
293
+ table: 'users',
294
+ type: 'inner', // 'inner' | 'left' | 'right' | 'full' | 'cross' (default: 'inner')
295
+ on: {
296
+ left: 'posts.author_id',
297
+ right: 'users.id',
298
+ operator: '=' // '=' | '!=' | '<' | '<=' | '>' | '>='
299
+ },
300
+ alias: 'author' // Optional alias
301
+ }
302
+ ],
303
+ shouldErrorOnNotFound: false, // Optional: When false, returns empty data instead of 404 (default: true)
304
+ middleware: [authMiddleware], // Optional: Route-specific middleware
305
+ exitMiddleware: [auditMiddleware], // Optional: Middleware that runs after response is sent
306
+ methodOverride: 'get' // Optional: Override the HTTP method
247
307
  });
248
308
  ```
249
309
 
310
+ **Filter operators:** `'='`, `'!='`, `'<'`, `'<='`, `'>'`, `'>='`, `'in'`, `'not in'`, `'like'`, `'not like'`
311
+
312
+ > **Note:** `'like'` uses PostgreSQL `ILIKE` for case-insensitive matching.
313
+
314
+ **Filter `value` types:** `'string'`, `'number'`, `'boolean'`, `'json'`, `'csv'` (splits comma-separated string into array), `'as-is'` (passes value through unchanged)
315
+
316
+ **Filter `location` options:** `'query'` (default), `'body'`, `'headers'`, `'request'`, `'params'`
317
+
318
+ **Filter `overrideValue`:** Can be a static value or a function `(req) => value` for dynamic values based on the request.
319
+
320
+ **Using joins with dot-notation:** When using joins, fields can use dot-notation to reference columns from joined tables: `'tableName.fieldName'`.
321
+
250
322
  #### `honey.getById(options)`
251
323
 
252
324
  Creates a GET endpoint for retrieving a single resource by ID.
@@ -262,7 +334,19 @@ honey.getById({
262
334
  operator: '=',
263
335
  overrideValue: true // Force a value regardless of request
264
336
  }
265
- }
337
+ },
338
+ joins: [
339
+ // Optional: SQL joins (same as honey.get())
340
+ {
341
+ table: 'users',
342
+ type: 'left',
343
+ on: { left: 'posts.author_id', right: 'users.id' }
344
+ }
345
+ ],
346
+ shouldErrorOnNotFound: false, // Optional: When false, returns empty data instead of 404 (default: true)
347
+ middleware: [authMiddleware], // Optional: Route-specific middleware
348
+ exitMiddleware: [auditMiddleware], // Optional: Middleware that runs after response is sent
349
+ methodOverride: 'get' // Optional: Override the HTTP method
266
350
  });
267
351
  ```
268
352
 
@@ -280,7 +364,17 @@ honey.updateById({
280
364
  updated_at: '@updatedAt' // Set to current timestamp
281
365
  },
282
366
  message: 'Post updated',
283
- idField: 'slug' // Optional: Use a different field as identifier
367
+ idField: 'slug', // Optional: Use a different field as identifier
368
+ filter: {
369
+ // Optional: Additional WHERE conditions beyond the ID
370
+ author_id: {
371
+ operator: '=',
372
+ value: 'number'
373
+ }
374
+ },
375
+ middleware: [authMiddleware], // Optional: Route-specific middleware
376
+ exitMiddleware: [auditMiddleware], // Optional: Middleware that runs after response is sent
377
+ methodOverride: 'put' // Optional: Override the HTTP method
284
378
  });
285
379
  ```
286
380
 
@@ -302,14 +396,21 @@ honey.update({
302
396
  value: 'number'
303
397
  }
304
398
  },
305
- message: 'Posts updated'
399
+ message: 'Posts updated',
400
+ middleware: [authMiddleware], // Optional: Route-specific middleware
401
+ exitMiddleware: [auditMiddleware], // Optional: Middleware that runs after response is sent
402
+ methodOverride: 'put' // Optional: Override the HTTP method
306
403
  });
307
404
  ```
308
405
 
406
+ > **Note:** `filter` is **required** for `honey.update()` to prevent unintended bulk updates.
407
+
309
408
  #### `honey.upsertById(options)`
310
409
 
311
410
  Creates a PUT endpoint for upserting a resource by ID.
312
411
 
412
+ After an upsert, `req.isInsert` is set to `true` if the operation was an INSERT, or `false` if it was an UPDATE. This flag is accessible in `processResponseData` and `exitMiddleware`.
413
+
313
414
  ```typescript
314
415
  honey.upsertById({
315
416
  resource: 'posts',
@@ -319,7 +420,15 @@ honey.upsertById({
319
420
  updated_at: '@updatedAt'
320
421
  },
321
422
  message: 'Post upserted',
322
- idField: 'id' // Field to use for conflict detection
423
+ idField: 'id', // Required: Field to use for conflict detection
424
+ doNothingOnConflict: false, // Optional: When true, returns existing record unchanged on conflict (default: false)
425
+ middleware: [authMiddleware], // Optional: Route-specific middleware
426
+ exitMiddleware: [auditMiddleware], // Optional: Middleware that runs after response is sent
427
+ methodOverride: 'put', // Optional: Override the HTTP method
428
+ processResponseData: (data, req) => {
429
+ // req.isInsert is true for INSERT, false for UPDATE
430
+ return { ...data, wasInserted: req.isInsert };
431
+ }
323
432
  });
324
433
  ```
325
434
 
@@ -327,6 +436,8 @@ honey.upsertById({
327
436
 
328
437
  Creates a PUT endpoint for upserting a resource with custom conflict resolution.
329
438
 
439
+ After an upsert, `req.isInsert` is set to `true` if the operation was an INSERT, or `false` if it was an UPDATE. This flag is accessible in `processResponseData` and `exitMiddleware`.
440
+
330
441
  ```typescript
331
442
  honey.upsert({
332
443
  resource: 'posts',
@@ -337,7 +448,11 @@ honey.upsert({
337
448
  updated_at: '@updatedAt'
338
449
  },
339
450
  message: 'Post upserted',
340
- conflictTarget: ['slug'] // Fields to check for conflicts
451
+ conflictTarget: ['slug'], // Fields to check for conflicts
452
+ doNothingOnConflict: false, // Optional: When true, returns existing record unchanged on conflict (default: false)
453
+ middleware: [authMiddleware], // Optional: Route-specific middleware
454
+ exitMiddleware: [auditMiddleware], // Optional: Middleware that runs after response is sent
455
+ methodOverride: 'put' // Optional: Override the HTTP method
341
456
  });
342
457
  ```
343
458
 
@@ -356,10 +471,74 @@ honey.deleteById({
356
471
  operator: '=',
357
472
  value: 'number'
358
473
  }
359
- }
474
+ },
475
+ middleware: [authMiddleware], // Optional: Route-specific middleware
476
+ exitMiddleware: [auditMiddleware], // Optional: Middleware that runs after response is sent
477
+ methodOverride: 'delete' // Optional: Override the HTTP method
360
478
  });
361
479
  ```
362
480
 
481
+ #### `honey.delete(options)`
482
+
483
+ Creates a DELETE endpoint for bulk-deleting resources (no ID in path).
484
+
485
+ ```typescript
486
+ honey.delete({
487
+ resource: 'posts',
488
+ filter: {
489
+ // Filter criteria for records to delete
490
+ author_id: {
491
+ operator: '=',
492
+ value: 'number'
493
+ }
494
+ },
495
+ message: 'Posts deleted',
496
+ table: 'blog_posts', // Optional: Table name if different from resource
497
+ pathOverride: '/blog/posts', // Optional: Custom path
498
+ middleware: [authMiddleware], // Optional: Route-specific middleware
499
+ exitMiddleware: [auditMiddleware], // Optional: Middleware that runs after response is sent
500
+ methodOverride: 'delete', // Optional: Override the HTTP method
501
+ processErrorResponse: (err) => err // Optional: Customize error response
502
+ });
503
+ ```
504
+
505
+ #### `honey.query(options)`
506
+
507
+ Creates a custom endpoint backed by a raw Knex query. Useful for complex queries that go beyond standard CRUD operations.
508
+
509
+ Automatically supports `?page=` and `?limit=` query parameters for pagination.
510
+
511
+ ```typescript
512
+ honey.query({
513
+ resource: 'stats',
514
+ methodOverride: 'get', // Optional: HTTP method (default: 'get')
515
+ query: (knex, req) => {
516
+ return knex('posts')
517
+ .select('author_id')
518
+ .count('id as post_count')
519
+ .groupBy('author_id');
520
+ },
521
+ processResponseData: (data, req) => {
522
+ return data;
523
+ },
524
+ pathOverride: '/stats/posts', // Optional: Custom path
525
+ middleware: [authMiddleware], // Optional: Route-specific middleware
526
+ exitMiddleware: [auditMiddleware], // Optional: Middleware that runs after response is sent
527
+ processErrorResponse: (err) => err // Optional: Customize error response
528
+ });
529
+ ```
530
+
531
+ **Options:**
532
+
533
+ - `resource` — Resource name used in the URL path
534
+ - `query` — Function receiving `(knex, req)` and returning a Knex `QueryBuilder`
535
+ - `pathOverride` — Optional custom path
536
+ - `methodOverride` — HTTP method (default: `'get'`)
537
+ - `middleware` — Route-specific middleware
538
+ - `exitMiddleware` — Middleware that runs after the response is sent
539
+ - `processResponseData` — Transform the response data
540
+ - `processErrorResponse` — Customize the error response
541
+
363
542
  ### Advanced Usage
364
543
 
365
544
  #### Custom Response Processing
@@ -414,26 +593,34 @@ HoneyJS provides several utilities for working directly with the database.
414
593
  ```typescript
415
594
  import { defineModel, DataTypes } from '@promind/honey';
416
595
 
417
- const User = defineModel('users', {
418
- id: {
419
- type: DataTypes.UUID,
420
- defaultValue: DataTypes.UUIDV4,
421
- primaryKey: true
422
- },
423
- name: {
424
- type: DataTypes.STRING,
425
- allowNull: false
426
- },
427
- email: {
428
- type: DataTypes.STRING,
429
- allowNull: false,
430
- unique: true
596
+ const User = defineModel(
597
+ 'users',
598
+ {
599
+ id: {
600
+ type: DataTypes.UUID,
601
+ defaultValue: DataTypes.UUIDV4,
602
+ primaryKey: true
603
+ },
604
+ name: {
605
+ type: DataTypes.STRING,
606
+ allowNull: false
607
+ },
608
+ email: {
609
+ type: DataTypes.STRING,
610
+ allowNull: false,
611
+ unique: true
612
+ },
613
+ created_at: {
614
+ type: DataTypes.DATE,
615
+ defaultValue: DataTypes.NOW
616
+ }
431
617
  },
432
- created_at: {
433
- type: DataTypes.DATE,
434
- defaultValue: DataTypes.NOW
618
+ {
619
+ // Optional: Sequelize ModelOptions
620
+ timestamps: false,
621
+ tableName: 'app_users'
435
622
  }
436
- });
623
+ );
437
624
 
438
625
  export default User;
439
626
  ```
@@ -455,6 +642,35 @@ async function getUsersWithPosts() {
455
642
  }
456
643
  ```
457
644
 
645
+ ### `createReqTransit`
646
+
647
+ `createReqTransit` creates a typed transit object for safely passing data between middleware and controllers via the request object.
648
+
649
+ ```typescript
650
+ import { createReqTransit } from '@promind/honey';
651
+
652
+ // Create a typed transit for passing data between middleware and controllers
653
+ const userTransit = createReqTransit<User>('currentUser');
654
+
655
+ // In middleware
656
+ const authMiddleware = (req, res, next) => {
657
+ const user = verifyToken(req.headers.authorization);
658
+ userTransit.inject(req, user);
659
+ next();
660
+ };
661
+
662
+ // In processResponseData or exitMiddleware
663
+ honey.getById({
664
+ resource: 'posts',
665
+ fields: ['id', 'title'],
666
+ middleware: [authMiddleware],
667
+ processResponseData: (data, req) => {
668
+ const user = userTransit.extract(req, null);
669
+ return { ...data, viewedBy: user?.name };
670
+ }
671
+ });
672
+ ```
673
+
458
674
  ## Error Handling
459
675
 
460
676
  HoneyJS provides a consistent error handling mechanism:
@@ -501,6 +717,16 @@ honey.create({
501
717
  });
502
718
  ```
503
719
 
720
+ `validateRequestData` accepts the following arguments:
721
+
722
+ ```typescript
723
+ validateRequestData(
724
+ schema, // Joi ObjectSchema
725
+ location?, // 'body' | 'params' | 'query' | 'headers' | 'cookies' (default: 'body')
726
+ options? // Joi ValidationOptions (default: { allowUnknown: true })
727
+ )
728
+ ```
729
+
504
730
  ### Custom Middleware
505
731
 
506
732
  ```typescript
@@ -776,6 +1002,26 @@ honey.create({
776
1002
  });
777
1003
  ```
778
1004
 
1005
+ ### `ExitMiddleware`
1006
+
1007
+ `ExitMiddleware` is middleware that runs after the response has been sent. It receives the response data as its first argument, making it ideal for audit logging, analytics, or post-response side effects.
1008
+
1009
+ ```typescript
1010
+ import { ExitMiddleware } from '@promind/honey';
1011
+
1012
+ const auditMiddleware: ExitMiddleware = (data, req, res, next) => {
1013
+ console.log(`Response sent for ${req.method} ${req.path}:`, data);
1014
+ next();
1015
+ };
1016
+
1017
+ honey.create({
1018
+ resource: 'users',
1019
+ params: { name: 'string', email: 'string' },
1020
+ message: 'User created',
1021
+ exitMiddleware: [auditMiddleware]
1022
+ });
1023
+ ```
1024
+
779
1025
  ## Contributing
780
1026
 
781
1027
  Contributions are welcome! Please feel free to submit a Pull Request.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promind/honey",
3
- "version": "1.47.0",
3
+ "version": "1.47.13",
4
4
  "description": "An expressJS based library for simplifying the development of CRUD APIs using Postgres",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -85,4 +85,4 @@
85
85
  "yamljs": "^0.3.0"
86
86
  },
87
87
  "packageManager": "yarn@4.9.4"
88
- }
88
+ }
package/CHANGELOG.md DELETED
@@ -1,749 +0,0 @@
1
- # @promind/honey
2
-
3
- ## 1.47.0
4
-
5
- ### Minor Changes
6
-
7
- - 00ed488: add optional shouldErrorOnNotFound flag for GET operations
8
-
9
- ## 1.46.3
10
-
11
- ### Patch Changes
12
-
13
- - Patch
14
-
15
- ## 1.46.2
16
-
17
- ### Patch Changes
18
-
19
- - Patch
20
-
21
- ## 1.46.1
22
-
23
- ### Patch Changes
24
-
25
- - Patch
26
-
27
- ## 1.46.0
28
-
29
- ### Minor Changes
30
-
31
- - 6889afa: Add request transit utility for Express requests and upgrade TypeScript to 5.8.3.
32
-
33
- ## 1.45.1
34
-
35
- ### Patch Changes
36
-
37
- - Patch
38
-
39
- ## 1.44.2
40
-
41
- ### Patch Changes
42
-
43
- - Patch
44
-
45
- ## 1.44.1
46
-
47
- ### Patch Changes
48
-
49
- - Patch
50
-
51
- ## 1.44.0
52
-
53
- ### Minor Changes
54
-
55
- - f827d97: Add `doNothingOnConflict` option for upsert operations to prevent updates on conflict.
56
-
57
- ## 1.43.0
58
-
59
- ### Minor Changes
60
-
61
- - 15f6363: Add `isInsert` property to the request object, populated by the upsert controller based on the database's `xmax` value to indicate if a row was inserted.
62
-
63
- ## 1.42.0
64
-
65
- ### Minor Changes
66
-
67
- - 4c3bad9: add support for in/not-in filters using csv
68
-
69
- ## 1.41.3
70
-
71
- ### Patch Changes
72
-
73
- - Patch
74
-
75
- ## 1.41.2
76
-
77
- ### Patch Changes
78
-
79
- - afe3d4e: remove async support from query function
80
-
81
- ## 1.41.1
82
-
83
- ### Patch Changes
84
-
85
- - 2c30339: Remove unnecessary Promise.resolve around the query function call
86
-
87
- ## 1.41.0
88
-
89
- ### Minor Changes
90
-
91
- - 8f82e82: support async query functions in queryController
92
-
93
- ## 1.40.0
94
-
95
- ### Minor Changes
96
-
97
- - 2a73ea2: Update the `upsertByIdController` and `upsertController` to handle the response data correctly by accessing the first element of the result. This change ensures proper data formatting in the response.
98
-
99
- ## 1.39.1
100
-
101
- ### Patch Changes
102
-
103
- - Patch
104
-
105
- ## 1.39.0
106
-
107
- ### Minor Changes
108
-
109
- - dec4f79: introduce joins and custom queries
110
-
111
- ## 1.38.8
112
-
113
- ### Patch Changes
114
-
115
- - Patch
116
-
117
- ## 1.38.7
118
-
119
- ### Patch Changes
120
-
121
- - Patch
122
-
123
- ## 1.38.6
124
-
125
- ### Patch Changes
126
-
127
- - Patch
128
-
129
- ## 1.38.5
130
-
131
- ### Patch Changes
132
-
133
- - Patch
134
-
135
- ## 1.38.4
136
-
137
- ### Patch Changes
138
-
139
- - Patch
140
-
141
- ## 1.38.2
142
-
143
- ### Patch Changes
144
-
145
- - Patch
146
-
147
- ## 1.38.1
148
-
149
- ### Patch Changes
150
-
151
- - Patch
152
-
153
- ## 1.38.0
154
-
155
- ### Minor Changes
156
-
157
- - a896341: add standalone delete route
158
-
159
- ## 1.37.0
160
-
161
- ### Minor Changes
162
-
163
- - 660aadb: add support for filter param retrieval location and filter override value callback
164
-
165
- ## 1.36.2
166
-
167
- ### Patch Changes
168
-
169
- - Patch
170
-
171
- ## 1.36.1
172
-
173
- ### Patch Changes
174
-
175
- - Patch
176
-
177
- ## 1.36.0
178
-
179
- ### Minor Changes
180
-
181
- - 7038522: allow all sequelize options for raw query
182
-
183
- ## 1.35.0
184
-
185
- ### Minor Changes
186
-
187
- - ec2733c: add support for method override
188
-
189
- ## 1.34.5
190
-
191
- ### Patch Changes
192
-
193
- - Patch
194
-
195
- ## 1.34.4
196
-
197
- ### Patch Changes
198
-
199
- - Patch
200
-
201
- ## 1.34.3
202
-
203
- ### Patch Changes
204
-
205
- - Patch
206
-
207
- ## 1.34.2
208
-
209
- ### Patch Changes
210
-
211
- - Patch
212
-
213
- ## 1.34.1
214
-
215
- ### Patch Changes
216
-
217
- - Patch
218
-
219
- ## 1.34.0
220
-
221
- ### Minor Changes
222
-
223
- - a4273b9: switch to knex for query building
224
-
225
- ## 1.33.4
226
-
227
- ### Patch Changes
228
-
229
- - Patch
230
-
231
- ## 1.33.3
232
-
233
- ### Patch Changes
234
-
235
- - Patch
236
-
237
- ## 1.33.2
238
-
239
- ### Patch Changes
240
-
241
- - Patch
242
-
243
- ## 1.33.1
244
-
245
- ### Patch Changes
246
-
247
- - Patch
248
-
249
- ## 1.33.0
250
-
251
- ### Minor Changes
252
-
253
- - 84686ff: add support for override values in filters
254
-
255
- ## 1.32.1
256
-
257
- ### Patch Changes
258
-
259
- - Patch
260
-
261
- ## 1.32.0
262
-
263
- ### Minor Changes
264
-
265
- - f788ffb: add support for additional filter query to getbyid
266
-
267
- ## 1.31.0
268
-
269
- ### Minor Changes
270
-
271
- - 01fe775: add support for additional filter query to updatebyid
272
-
273
- ## 1.30.1
274
-
275
- ### Patch Changes
276
-
277
- - Patch
278
-
279
- ## 1.30.0
280
-
281
- ### Minor Changes
282
-
283
- - e3a1bde: add support for additional filter query to deletion resource
284
-
285
- ## 1.29.0
286
-
287
- ### Minor Changes
288
-
289
- - eafc865: add request data validation
290
-
291
- ## 1.28.2
292
-
293
- ### Patch Changes
294
-
295
- - Patch
296
-
297
- ## 1.28.1
298
-
299
- ### Patch Changes
300
-
301
- - Patch
302
-
303
- ## 1.28.0
304
-
305
- ### Minor Changes
306
-
307
- - 35be0f6: add error response processing function
308
-
309
- ## 1.27.3
310
-
311
- ### Patch Changes
312
-
313
- - Patch
314
-
315
- ## 1.27.2
316
-
317
- ### Patch Changes
318
-
319
- - Patch
320
-
321
- ## 1.27.1
322
-
323
- ### Patch Changes
324
-
325
- - Patch
326
-
327
- ## 1.27.0
328
-
329
- ### Minor Changes
330
-
331
- - 50d7761: expose more types
332
-
333
- ## 1.26.0
334
-
335
- ### Minor Changes
336
-
337
- - 183512a: add support for table name override
338
-
339
- ## 1.25.4
340
-
341
- ### Patch Changes
342
-
343
- - eb1f657: bug fix: remove id from request path for update method
344
-
345
- ## 1.25.2
346
-
347
- ### Patch Changes
348
-
349
- - Patch
350
-
351
- ## 1.25.1
352
-
353
- ### Patch Changes
354
-
355
- - Patch
356
-
357
- ## 1.25.0
358
-
359
- ### Minor Changes
360
-
361
- - 0231e1d: add support for custom id field on delete endpoints
362
-
363
- ## 1.24.6
364
-
365
- ### Patch Changes
366
-
367
- - Patch
368
-
369
- ## 1.24.5
370
-
371
- ### Patch Changes
372
-
373
- - 530dbd3: fix misuse of processResponseData
374
-
375
- ## 1.24.4
376
-
377
- ### Patch Changes
378
-
379
- - Patch
380
-
381
- ## 1.24.3
382
-
383
- ### Patch Changes
384
-
385
- - Patch
386
-
387
- ## 1.24.2
388
-
389
- ### Patch Changes
390
-
391
- - Patch
392
-
393
- ## 1.24.1
394
-
395
- ### Patch Changes
396
-
397
- - Patch
398
-
399
- ## 1.24.0
400
-
401
- ### Minor Changes
402
-
403
- - 7a4e415: update dependencies
404
-
405
- ## 1.23.1
406
-
407
- ### Patch Changes
408
-
409
- - Patch
410
-
411
- ## 1.23.0
412
-
413
- ### Minor Changes
414
-
415
- - 6d54494: add upsert and update controllers
416
-
417
- ## 1.22.3
418
-
419
- ### Patch Changes
420
-
421
- - 1d537f5: fix issue with upsert
422
-
423
- ## 1.22.2
424
-
425
- ### Patch Changes
426
-
427
- - Patch
428
-
429
- ## 1.22.1
430
-
431
- ### Patch Changes
432
-
433
- - Patch
434
-
435
- ## 1.22.0
436
-
437
- ### Minor Changes
438
-
439
- - d28cd30: add support for upsert
440
-
441
- ## 1.21.3
442
-
443
- ### Patch Changes
444
-
445
- - 36a36f3: fix unreachable code
446
-
447
- ## 1.21.2
448
-
449
- ### Patch Changes
450
-
451
- - 9bb4921: fix
452
-
453
- ## 1.21.1
454
-
455
- ### Patch Changes
456
-
457
- - 1c456d7: make req param in processResponseData compulsory
458
-
459
- ## 1.21.0
460
-
461
- ### Minor Changes
462
-
463
- - e9ae5d5: add request object to process response data
464
-
465
- ## 1.20.1
466
-
467
- ### Patch Changes
468
-
469
- - 9b7cead: only log response in non-prod to reduce noise
470
-
471
- ## 1.20.0
472
-
473
- ### Minor Changes
474
-
475
- - 3fe7e9f: remove duplicate code and specify default exit middleware for logging response
476
-
477
- ## 1.19.0
478
-
479
- ### Minor Changes
480
-
481
- - 27628ba: add support for response data preprocessing
482
-
483
- ## 1.18.1
484
-
485
- ### Patch Changes
486
-
487
- - 887a3f3: fix
488
-
489
- ## 1.18.0
490
-
491
- ### Minor Changes
492
-
493
- - e0bfb0f: add full support for raw routes
494
-
495
- ## 1.17.2
496
-
497
- ### Patch Changes
498
-
499
- - 821421e: expose express raw only
500
-
501
- ## 1.17.1
502
-
503
- ### Patch Changes
504
-
505
- - 74b8130: expose express
506
-
507
- ## 1.17.0
508
-
509
- ### Minor Changes
510
-
511
- - 573a9d1: make update and create params optional
512
-
513
- ## 1.16.1
514
-
515
- ### Patch Changes
516
-
517
- - f656269: return pagination only when used
518
-
519
- ## 1.16.0
520
-
521
- ### Minor Changes
522
-
523
- - 449a01b: remove GET filters when not present in query params
524
-
525
- ## 1.15.6
526
-
527
- ### Patch Changes
528
-
529
- - e2289fa: fix table supporting casing
530
-
531
- ## 1.15.5
532
-
533
- ### Patch Changes
534
-
535
- - fc2fd51: make get query filter optional
536
-
537
- ## 1.15.4
538
-
539
- ### Patch Changes
540
-
541
- - 61f6c43: fix json formatting for update queriess
542
-
543
- ## 1.15.3
544
-
545
- ### Patch Changes
546
-
547
- - 77ec734: fix typescript error
548
-
549
- ## 1.15.2
550
-
551
- ### Patch Changes
552
-
553
- - cc75e3a: do not format json
554
-
555
- ## 1.15.1
556
-
557
- ### Patch Changes
558
-
559
- - c870306: do not format json
560
-
561
- ## 1.15.0
562
-
563
- ### Minor Changes
564
-
565
- - fbfeb34: add support for json datatype
566
-
567
- ## 1.14.3
568
-
569
- ### Patch Changes
570
-
571
- - ce78005: init model
572
-
573
- ## 1.14.2
574
-
575
- ### Patch Changes
576
-
577
- - 874e3e0: fix binding in model creator
578
-
579
- ## 1.14.1
580
-
581
- ### Patch Changes
582
-
583
- - 10bc2ba: bind ModelCreator
584
-
585
- ## 1.14.0
586
-
587
- ### Minor Changes
588
-
589
- - 3eaaf64: add model creator
590
-
591
- ## 1.13.5
592
-
593
- ### Patch Changes
594
-
595
- - d8b072d: fix function naming
596
-
597
- ## 1.13.4
598
-
599
- ### Patch Changes
600
-
601
- - d35cf32: fix
602
-
603
- ## 1.13.3
604
-
605
- ### Patch Changes
606
-
607
- - 54aa6f7: expose express
608
-
609
- ## 1.13.2
610
-
611
- ### Patch Changes
612
-
613
- - 30d38f0: add more exposed types
614
-
615
- ## 1.13.1
616
-
617
- ### Patch Changes
618
-
619
- - bc6b6a9: expose all sequelize types
620
-
621
- ## 1.13.0
622
-
623
- ### Minor Changes
624
-
625
- - bae12c1: refactor for early init of sequelize
626
-
627
- ## 1.12.0
628
-
629
- ### Minor Changes
630
-
631
- - e4a0c22: add data override for create response and expose http error utility methods
632
-
633
- ## 1.11.0
634
-
635
- ### Minor Changes
636
-
637
- - ff95bcf: fix race condition and remove params from setupDB call
638
-
639
- ## 1.10.2
640
-
641
- ### Patch Changes
642
-
643
- - 5c3e838: fix binding for config export
644
-
645
- ## 1.10.1
646
-
647
- ### Patch Changes
648
-
649
- - b4bc78d: avoid duplicate db connections
650
-
651
- ## 1.10.0
652
-
653
- ### Minor Changes
654
-
655
- - 082e063: expose db setup
656
-
657
- ## 1.9.0
658
-
659
- ### Minor Changes
660
-
661
- - ec2d1ee: change response structure for post requests
662
-
663
- ## 1.8.2
664
-
665
- ### Patch Changes
666
-
667
- - 3c958a1: make params in db query optional
668
-
669
- ## 1.8.1
670
-
671
- ### Patch Changes
672
-
673
- - e5f5e1a: make replacements optional in db query util
674
-
675
- ## 1.8.0
676
-
677
- ### Minor Changes
678
-
679
- - 702bf79: add raw db querying utility
680
-
681
- ## 1.7.0
682
-
683
- ### Minor Changes
684
-
685
- - 1157337: add id field support to update by id
686
-
687
- ## 1.6.0
688
-
689
- ### Minor Changes
690
-
691
- - 6dc1c38: add jsdoc for fields and fix middleware return type
692
-
693
- ## 1.5.5
694
-
695
- ### Patch Changes
696
-
697
- - ef81f03: remove duplicate middleware declaration
698
-
699
- ## 1.5.4
700
-
701
- ### Patch Changes
702
-
703
- - 8f255d8: grant write permission to GH action
704
- - 8cb3cd5: fix GH Actions
705
- - 8bf547b: fix GH actions
706
- - 794d0bd: fix GH action
707
- - d1e2482: extend middleware interface to support data param
708
-
709
- ## 1.5.0
710
-
711
- ### Minor Changes
712
-
713
- - return id on data creation requests
714
-
715
- ## 1.4.1
716
-
717
- ### Patch Changes
718
-
719
- - specify exit middleware type
720
-
721
- ## 1.4.0
722
-
723
- ### Minor Changes
724
-
725
- - add support for exit Middleware
726
-
727
- ## 1.3.3
728
-
729
- ### Patch Changes
730
-
731
- - fix routePrefix declaration
732
-
733
- ## 1.3.2
734
-
735
- ### Patch Changes
736
-
737
- - change metadata interface for createHoney to include routePrefix
738
-
739
- ## 1.3.1
740
-
741
- ### Patch Changes
742
-
743
- - refactor path prefixing moving default api prefix to the root level
744
-
745
- ## 1.3.0
746
-
747
- ### Minor Changes
748
-
749
- - add the ability to override paths