@samoa-house-lib/shl-types 1.2.0 → 1.3.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.
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@samoa-house-lib/shl-types",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Shared Types & Constants",
5
- "type": "module",
6
5
  "main": "src/index.ts",
7
6
  "scripts": {
8
7
  "build": "tsc",
package/src/types.ts CHANGED
@@ -8,6 +8,7 @@ export type BookBatch = z.infer<typeof bookBatchSchema>
8
8
  export type BookWithID = z.infer<typeof newDbEntrySchema>
9
9
 
10
10
  export type CreateBookRequest = z.infer<typeof addBookRequest>
11
+ export type updateRequest = z.infer<typeof updateRequestSchema>
11
12
 
12
13
  export type ColumnName = z.infer<typeof dbColumnNameSchema>
13
14
 
@@ -65,4 +66,10 @@ export const newDbEntrySchema = addBookRequest.extend({
65
66
  export const responseSchema = z.object({
66
67
  message: z.string(),
67
68
  data: bookBatchSchema.nullable()
68
- })
69
+ })
70
+
71
+ export const updateRequestSchema = z.object({
72
+ colName: dbColumnNameSchema,
73
+ colValue: z.string(),
74
+ id: shlIdSchema
75
+ })
package/tsconfig.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "ES2020",
3
+ "target": "ES2016",
4
+ "module": "CommonJS",
5
5
  "declaration": true,
6
6
  "esModuleInterop": true,
7
7
  "forceConsistentCasingInFileNames": true,
8
8
  "strict": true,
9
9
  "skipLibCheck": true,
10
- "moduleResolution": "Bundler",
11
10
  "outDir": "./dist"
12
11
  }
13
12
  }