@exabugs/dynamodb-client 0.2.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -7,6 +7,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.2] - 2024-12-01
11
+
12
+ ### Added
13
+
14
+ - **Types**: Export `ResultBase` and `InputBase` from `@exabugs/dynamodb-client/client`
15
+ - `ResultBase`: Base interface for document results (with required `id` field)
16
+ - `InputBase`: Base interface for document inputs (with optional `id` field)
17
+ - Allows users to extend `ResultBase` for type-safe collection definitions
18
+ - Improves type safety when defining custom document interfaces
19
+
20
+ ### Changed
21
+
22
+ - **Client**: Updated `client/index.ts` to export base types
23
+ - `export { Collection, type InputBase, type ResultBase } from './Collection.js'`
24
+
25
+ ## [0.2.1] - 2025-01-19
26
+
27
+ ### Fixed
28
+
29
+ - **Server**: Removed `database` field validation from Lambda handler
30
+ - Fixed runtime error: "Missing required field: database"
31
+ - `MongoDBStyleRequest` interface no longer includes `database` field
32
+ - `parseRequestBody()` function no longer validates `database` field
33
+ - Completes the v0.2.0 breaking change implementation
34
+
35
+ ### Added
36
+
37
+ - **Tests**: Added comprehensive unit tests for Lambda handler
38
+ - Request body parsing tests (7 tests)
39
+ - MongoDB-style API operation tests (8 tests)
40
+ - v0.2.0 breaking change verification tests (2 tests)
41
+ - CORS and method validation tests (2 tests)
42
+ - Authentication header validation tests (2 tests)
43
+ - Total: 21 new tests to prevent regression
44
+
10
45
  ## [0.2.0] - 2024-12-01
11
46
 
12
47
  ### Changed
@@ -7,6 +7,6 @@
7
7
  * - Token認証: '@exabugs/dynamodb-client/client/token'
8
8
  */
9
9
  export { Database } from './Database.js';
10
- export { Collection } from './Collection.js';
10
+ export { Collection, type InputBase, type ResultBase } from './Collection.js';
11
11
  export { FindCursor } from './FindCursor.js';
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAmC,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v0.2.0
2
- // Built: 2025-12-01T02:39:20.698Z
1
+ // @exabugs/dynamodb-client v0.2.2
2
+ // Built: 2025-12-01T05:04:46.205Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -31141,9 +31141,6 @@ function parseRequestBody(body) {
31141
31141
  if (!parsed.operation) {
31142
31142
  throw new Error("Missing required field: operation");
31143
31143
  }
31144
- if (!parsed.database) {
31145
- throw new Error("Missing required field: database");
31146
- }
31147
31144
  if (!parsed.collection) {
31148
31145
  throw new Error("Missing required field: collection");
31149
31146
  }