@esb-market-contracts/admin-backend 1.0.7 → 1.0.9

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.
Files changed (2) hide show
  1. package/hono.d.ts +152 -9
  2. package/package.json +1 -1
package/hono.d.ts CHANGED
@@ -17,10 +17,75 @@ declare const EXCEPTION_STATUS_CODES: readonly [
17
17
  ];
18
18
  export type SuccessStatusCode = (typeof SUCCESS_STATUS_CODES)[number];
19
19
  export type ExceptionStatusCode = (typeof EXCEPTION_STATUS_CODES)[number];
20
- declare const playgroundRouter: import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, {
21
- "/playground": {
20
+ declare const sessionsRouter: import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, {
21
+ "/iam/sessions/create": {
22
+ $post: {
23
+ input: {
24
+ json: {
25
+ userId: number;
26
+ tokenHash: string;
27
+ expiresAt: unknown;
28
+ ipAddress?: string | null | undefined;
29
+ };
30
+ };
31
+ output: {
32
+ kind: "error";
33
+ status: ExceptionStatusCode;
34
+ error: string;
35
+ };
36
+ outputFormat: "json";
37
+ status: 400;
38
+ } | {
39
+ input: {
40
+ json: {
41
+ userId: number;
42
+ tokenHash: string;
43
+ expiresAt: unknown;
44
+ ipAddress?: string | null | undefined;
45
+ };
46
+ };
47
+ output: {
48
+ kind: "error";
49
+ status: ExceptionStatusCode;
50
+ error: string;
51
+ } | {
52
+ kind: "data";
53
+ status: SuccessStatusCode;
54
+ data: {
55
+ id: number;
56
+ createdAt: string;
57
+ userId: number;
58
+ tokenHash: string;
59
+ ipAddress: string | null;
60
+ revokedAt: string | null;
61
+ expiresAt: string;
62
+ };
63
+ };
64
+ outputFormat: "json";
65
+ status: 200 | 201 | 202 | 307 | 400 | 401 | 403 | 404 | 405 | 409 | 500;
66
+ };
67
+ };
68
+ } & {
69
+ "/iam/sessions/get": {
22
70
  $get: {
23
- input: {};
71
+ input: {
72
+ query: {
73
+ tokenHash: string;
74
+ };
75
+ };
76
+ output: {
77
+ kind: "error";
78
+ status: ExceptionStatusCode;
79
+ error: string;
80
+ };
81
+ outputFormat: "json";
82
+ status: 400;
83
+ } | {
84
+ input: {
85
+ query: {
86
+ tokenHash: string;
87
+ };
88
+ };
24
89
  output: {
25
90
  kind: "error";
26
91
  status: ExceptionStatusCode;
@@ -29,17 +94,95 @@ declare const playgroundRouter: import("hono/hono-base").HonoBase<import("hono/t
29
94
  kind: "data";
30
95
  status: SuccessStatusCode;
31
96
  data: {
32
- message: string;
97
+ id: number;
98
+ createdAt: string;
99
+ userId: number;
100
+ tokenHash: string;
101
+ ipAddress: string | null;
102
+ revokedAt: string | null;
103
+ expiresAt: string;
33
104
  };
34
105
  };
35
106
  outputFormat: "json";
36
107
  status: 200 | 201 | 202 | 307 | 400 | 401 | 403 | 404 | 405 | 409 | 500;
37
108
  };
38
109
  };
39
- }, "/playground", "/playground">;
40
-
41
- export {
42
- playgroundRouter as PlaygroundRouter,
43
- };
110
+ } & {
111
+ "/iam/sessions/get-active": {
112
+ $get: {
113
+ input: {
114
+ query: {
115
+ tokenHash: string;
116
+ };
117
+ };
118
+ output: {
119
+ kind: "error";
120
+ status: ExceptionStatusCode;
121
+ error: string;
122
+ };
123
+ outputFormat: "json";
124
+ status: 400;
125
+ } | {
126
+ input: {
127
+ query: {
128
+ tokenHash: string;
129
+ };
130
+ };
131
+ output: {
132
+ kind: "error";
133
+ status: ExceptionStatusCode;
134
+ error: string;
135
+ } | {
136
+ kind: "data";
137
+ status: SuccessStatusCode;
138
+ data: {
139
+ id: number;
140
+ createdAt: string;
141
+ userId: number;
142
+ tokenHash: string;
143
+ ipAddress: string | null;
144
+ revokedAt: string | null;
145
+ expiresAt: string;
146
+ };
147
+ };
148
+ outputFormat: "json";
149
+ status: 200 | 201 | 202 | 307 | 400 | 401 | 403 | 404 | 405 | 409 | 500;
150
+ };
151
+ };
152
+ } & {
153
+ "/iam/sessions/revoke": {
154
+ $post: {
155
+ input: {
156
+ json: {
157
+ id: number;
158
+ };
159
+ };
160
+ output: {
161
+ kind: "error";
162
+ status: ExceptionStatusCode;
163
+ error: string;
164
+ };
165
+ outputFormat: "json";
166
+ status: 400;
167
+ } | {
168
+ input: {
169
+ json: {
170
+ id: number;
171
+ };
172
+ };
173
+ output: {
174
+ kind: "error";
175
+ status: ExceptionStatusCode;
176
+ error: string;
177
+ } | {
178
+ kind: "void";
179
+ status: SuccessStatusCode;
180
+ };
181
+ outputFormat: "json";
182
+ status: 200 | 201 | 202 | 307 | 400 | 401 | 403 | 404 | 405 | 409 | 500;
183
+ };
184
+ };
185
+ }, "/iam/sessions", "/iam/sessions/revoke">;
186
+ export type SessionsRouter = typeof sessionsRouter;
44
187
 
45
188
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esb-market-contracts/admin-backend",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": false,