Skip to content

Commit 7cb8aa0

Browse files
fix: add missing cookies' response interface
1 parent 6f310f2 commit 7cb8aa0

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lomray/microservice-nodejs-lib",
3-
"version": "2.4.4",
3+
"version": "2.4.5",
44
"description": "Package for create microservice architecture based on NodeJS & inverted json.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

src/interfaces/core/i-microservice-response.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ enum CookiesAction {
66
remove = 'remove',
77
}
88

9+
interface IMicroserviceResponseCookie {
10+
action: keyof typeof CookiesAction;
11+
name: string;
12+
value?: string;
13+
options?: CookieOptions;
14+
}
15+
916
/**
1017
* Microservices data
1118
*/
1219
interface IMicroserviceResponsePayload {
13-
cookies?: {
14-
action: keyof typeof CookiesAction;
15-
name: string;
16-
value?: string;
17-
options?: CookieOptions;
18-
}[];
20+
cookies?: IMicroserviceResponseCookie[];
1921
}
2022

2123
type PayloadExtends<TParams> = TParams & IMicroserviceResponsePayload;
@@ -40,4 +42,5 @@ export {
4042
IMicroserviceResponseJson,
4143
IMicroserviceResponseResult,
4244
CookiesAction,
45+
IMicroserviceResponseCookie,
4346
};

0 commit comments

Comments
 (0)