lemon-model 1.0.4 → 1.0.5

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/README.md CHANGED
@@ -4,30 +4,29 @@ Common shared model definitions for both `backend` and `frontend`.
4
4
 
5
5
  ## Usage
6
6
 
7
- To develop backend-api, use `lemon-core` instead of this.
7
+ To develop backend-api, use [lemon-core](https://github.com/lemoncloud-io/lemon-core) instead of this.
8
8
 
9
9
  ```sh
10
- $ npm install --save lemon-core
10
+ npm install --save lemon-model
11
11
  ```
12
12
 
13
-
14
13
  ## Contribution
15
14
 
16
- Plz, request PR.
15
+ Plz, request PR.
17
16
 
18
17
  See [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md)
19
18
 
20
-
21
19
  ## LICENSE
22
20
 
23
- [MIT](LICENSE) - (C) 2019 LemonCloud Co Ltd. - All Rights Reserved.
24
-
21
+ [MIT](LICENSE) - (C) 2019 LemonCloud Co Ltd. - All Rights Reserved.„
25
22
 
26
23
  ----------------
27
- # VERSION INFO #
24
+
25
+ # VERSION INFO
28
26
 
29
27
  | Version | Description
30
28
  |-- |--
29
+ | 1.0.5 | optimized `NextIdentity` with `authorization`.
31
30
  | 1.0.4 | optimized `NextIdentity` with `referer` and `origin`.
32
31
  | 1.0.3 | optimized `NextIdentityCognito`
33
32
  | 1.0.0 | initial types out of the original `lemon-core@3.1.1`
@@ -8,6 +8,7 @@
8
8
  * @date 2020-01-03 support cognito-identity
9
9
  * @date 2021-12-07 support SearchBody
10
10
  * @date 2024-12-20 optimized `NextIdentityCognito`
11
+ * @date 2025-05-13 optimized `NextContext` with `Authorization` header
11
12
  *
12
13
  * @copyright (C) lemoncloud.io 2019 - All Rights Reserved.
13
14
  */
@@ -235,6 +236,10 @@ export interface NextContext<T extends NextIdentity = NextIdentity> {
235
236
  cookie?: {
236
237
  [key: string]: string;
237
238
  };
239
+ /**
240
+ * (optional) `authorization` in request headers if applicable.
241
+ */
242
+ authorization?: string;
238
243
  /**
239
244
  * (optional) `referer` in request headers if applicable.
240
245
  */
@@ -9,6 +9,7 @@
9
9
  * @date 2020-01-03 support cognito-identity
10
10
  * @date 2021-12-07 support SearchBody
11
11
  * @date 2024-12-20 optimized `NextIdentityCognito`
12
+ * @date 2025-05-13 optimized `NextContext` with `Authorization` header
12
13
  *
13
14
  * @copyright (C) lemoncloud.io 2019 - All Rights Reserved.
14
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"core-types.js","sourceRoot":"","sources":["../../src/types/core-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG"}
1
+ {"version":3,"file":"core-types.js","sourceRoot":"","sources":["../../src/types/core-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lemon-model",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Common shared model definitions for Lemon Micro-Service Platform",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",