lemon-model 1.0.2 → 1.0.4
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 +4 -2
- package/dist/types/core-types.d.ts +18 -1
- package/dist/types/core-types.js +1 -0
- package/dist/types/core-types.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# lemon-model
|
|
2
2
|
|
|
3
|
-
Common shared model definitions for both backend and frontend
|
|
3
|
+
Common shared model definitions for both `backend` and `frontend`.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
To develop backend-api, use `lemon-core` instead of this.
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npm install --save lemon-core
|
|
10
|
+
$ npm install --save lemon-core
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
|
|
@@ -28,4 +28,6 @@ See [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md)
|
|
|
28
28
|
|
|
29
29
|
| Version | Description
|
|
30
30
|
|-- |--
|
|
31
|
+
| 1.0.4 | optimized `NextIdentity` with `referer` and `origin`.
|
|
32
|
+
| 1.0.3 | optimized `NextIdentityCognito`
|
|
31
33
|
| 1.0.0 | initial types out of the original `lemon-core@3.1.1`
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @date 2019-11-20 initial version
|
|
8
8
|
* @date 2020-01-03 support cognito-identity
|
|
9
9
|
* @date 2021-12-07 support SearchBody
|
|
10
|
+
* @date 2024-12-20 optimized `NextIdentityCognito`
|
|
10
11
|
*
|
|
11
12
|
* @copyright (C) lemoncloud.io 2019 - All Rights Reserved.
|
|
12
13
|
*/
|
|
@@ -139,6 +140,14 @@ export interface NextIdentityCognito<T = any> extends NextIdentity<T> {
|
|
|
139
140
|
* - available since `3.1.1`
|
|
140
141
|
*/
|
|
141
142
|
caller?: string;
|
|
143
|
+
/**
|
|
144
|
+
* (optional) access-key used to sign.
|
|
145
|
+
*/
|
|
146
|
+
accessKey?: string;
|
|
147
|
+
/**
|
|
148
|
+
* (optional) api-key if applicable.
|
|
149
|
+
*/
|
|
150
|
+
apiKey?: string;
|
|
142
151
|
}
|
|
143
152
|
/**
|
|
144
153
|
* class: `NextIdentityAcess`
|
|
@@ -221,11 +230,19 @@ export interface NextContext<T extends NextIdentity = NextIdentity> {
|
|
|
221
230
|
*/
|
|
222
231
|
domain?: string;
|
|
223
232
|
/**
|
|
224
|
-
* cookie string of origin request
|
|
233
|
+
* (optional) cookie string of origin request if available.
|
|
225
234
|
*/
|
|
226
235
|
cookie?: {
|
|
227
236
|
[key: string]: string;
|
|
228
237
|
};
|
|
238
|
+
/**
|
|
239
|
+
* (optional) `referer` in request headers if applicable.
|
|
240
|
+
*/
|
|
241
|
+
referer?: string;
|
|
242
|
+
/**
|
|
243
|
+
* (optional) `origin` in request headers if applicable.
|
|
244
|
+
*/
|
|
245
|
+
origin?: string;
|
|
229
246
|
/**
|
|
230
247
|
* calling depth for every handler. ( automatically increased from lambda-handler )
|
|
231
248
|
*/
|
package/dist/types/core-types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-types.js","sourceRoot":"","sources":["../../src/types/core-types.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"core-types.js","sourceRoot":"","sources":["../../src/types/core-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lemon-model",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
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",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dist/**/*"
|
|
36
36
|
],
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
38
|
+
"node": ">=18.19.0"
|
|
39
39
|
},
|
|
40
40
|
"author": "Steve Jung <steve@lemoncloud.io>",
|
|
41
41
|
"license": "MIT",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"supertest": "^4.0.2",
|
|
63
63
|
"ts-jest": "^27.1.3",
|
|
64
64
|
"ts-node": "^8.10.2",
|
|
65
|
-
"ttypescript": "^1.5.
|
|
65
|
+
"ttypescript": "^1.5.15",
|
|
66
66
|
"typedoc": "^0.15.8",
|
|
67
67
|
"typescript": "^4.6.2"
|
|
68
68
|
},
|