@crowi/api 2.0.0-alpha.0 → 2.0.0-alpha.1
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/dist/hono/handlers/access-token.d.ts +55 -55
- package/dist/hono/handlers/activation.d.ts +27 -27
- package/dist/hono/handlers/admin/app.d.ts +26 -26
- package/dist/hono/handlers/admin/auth.d.ts +24 -24
- package/dist/hono/handlers/admin/mail.d.ts +30 -30
- package/dist/hono/handlers/admin/plugins.d.ts +112 -112
- package/dist/hono/handlers/admin/search.d.ts +21 -21
- package/dist/hono/handlers/admin/security.d.ts +24 -24
- package/dist/hono/handlers/admin/storage.d.ts +19 -19
- package/dist/hono/handlers/admin/users.d.ts +305 -305
- package/dist/hono/handlers/adminCrypto.d.ts +32 -32
- package/dist/hono/handlers/app.d.ts +11 -8
- package/dist/hono/handlers/app.js +31 -1
- package/dist/hono/handlers/app.js.map +1 -1
- package/dist/hono/handlers/attachment.d.ts +180 -180
- package/dist/hono/handlers/autocomplete.d.ts +45 -45
- package/dist/hono/handlers/backlink.d.ts +33 -33
- package/dist/hono/handlers/bookmark.d.ts +95 -95
- package/dist/hono/handlers/comment.d.ts +55 -55
- package/dist/hono/handlers/draft.d.ts +27 -27
- package/dist/hono/handlers/emailChange.d.ts +25 -25
- package/dist/hono/handlers/installer.d.ts +16 -16
- package/dist/hono/handlers/inviteAccept.d.ts +37 -37
- package/dist/hono/handlers/me.d.ts +92 -92
- package/dist/hono/handlers/notification.d.ts +94 -94
- package/dist/hono/handlers/oauth.d.ts +58 -58
- package/dist/hono/handlers/page-collab.d.ts +20 -20
- package/dist/hono/handlers/page-preview.d.ts +7 -7
- package/dist/hono/handlers/page.d.ts +333 -333
- package/dist/hono/handlers/passwordReset.d.ts +37 -37
- package/dist/hono/handlers/presence.d.ts +44 -44
- package/dist/hono/handlers/revision.d.ts +99 -99
- package/dist/hono/handlers/search.d.ts +64 -64
- package/dist/hono/handlers/tokenAuth.d.ts +80 -80
- package/dist/hono/handlers/user.d.ts +102 -102
- package/dist/hono/handlers/user.js +15 -5
- package/dist/hono/handlers/user.js.map +1 -1
- package/dist/hono/index.d.ts +94 -94
- package/dist/mcp/result.d.ts +15 -0
- package/dist/mcp/result.js +20 -1
- package/dist/mcp/result.js.map +1 -1
- package/dist/mcp/tools/page.js +9 -4
- package/dist/mcp/tools/page.js.map +1 -1
- package/dist/migration/migrations/index.js +2 -0
- package/dist/migration/migrations/index.js.map +1 -1
- package/dist/migration/migrations/relocate-reserved-api-paths.d.ts +3 -0
- package/dist/migration/migrations/relocate-reserved-api-paths.js +135 -0
- package/dist/migration/migrations/relocate-reserved-api-paths.js.map +1 -0
- package/dist/models/page.js +9 -2
- package/dist/models/page.js.map +1 -1
- package/dist/util/replace-url.d.ts +85 -0
- package/dist/util/replace-url.js +251 -0
- package/dist/util/replace-url.js.map +1 -0
- package/package.json +6 -4
- package/public/images/file-not-found.png +0 -0
- package/views/mail/activation.mjml +9 -0
- package/views/mail/activation.text +13 -0
- package/views/mail/adminApprovalPending.mjml +7 -0
- package/views/mail/adminApprovalPending.text +11 -0
- package/views/mail/emailChange.mjml +9 -0
- package/views/mail/emailChange.text +13 -0
- package/views/mail/invite.mjml +9 -0
- package/views/mail/invite.text +13 -0
- package/views/mail/layout.mjml +36 -0
- package/views/mail/passwordChanged.mjml +4 -0
- package/views/mail/passwordChanged.text +9 -0
- package/views/mail/passwordReset.mjml +9 -0
- package/views/mail/passwordReset.text +13 -0
- package/views/mail/test.mjml +2 -0
- package/views/mail/test.text +7 -0
|
@@ -4,23 +4,6 @@ import type { CrowiHonoBindings } from '../app';
|
|
|
4
4
|
export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>>(app: E, crowi: Crowi) => OpenAPIHono<CrowiHonoBindings, {
|
|
5
5
|
"/me": {
|
|
6
6
|
$get: {
|
|
7
|
-
input: {};
|
|
8
|
-
output: {
|
|
9
|
-
id: string;
|
|
10
|
-
username: string;
|
|
11
|
-
name: string;
|
|
12
|
-
email: string;
|
|
13
|
-
lang: "en" | "ja";
|
|
14
|
-
theme: "system" | "light" | "dark";
|
|
15
|
-
image: string | null;
|
|
16
|
-
hasPassword: boolean;
|
|
17
|
-
createdAt: string;
|
|
18
|
-
introduction?: string | undefined;
|
|
19
|
-
emailChangePending?: boolean | undefined;
|
|
20
|
-
};
|
|
21
|
-
outputFormat: "json";
|
|
22
|
-
status: 200;
|
|
23
|
-
} | {
|
|
24
7
|
input: {};
|
|
25
8
|
output: {
|
|
26
9
|
error: {
|
|
@@ -31,20 +14,8 @@ export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>
|
|
|
31
14
|
};
|
|
32
15
|
outputFormat: "json";
|
|
33
16
|
status: 401;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
} & {
|
|
37
|
-
"/me": {
|
|
38
|
-
$put: {
|
|
39
|
-
input: {
|
|
40
|
-
json: {
|
|
41
|
-
userForm: {
|
|
42
|
-
name: string;
|
|
43
|
-
email: string;
|
|
44
|
-
lang: "en" | "ja";
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
};
|
|
17
|
+
} | {
|
|
18
|
+
input: {};
|
|
48
19
|
output: {
|
|
49
20
|
id: string;
|
|
50
21
|
username: string;
|
|
@@ -60,7 +31,11 @@ export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>
|
|
|
60
31
|
};
|
|
61
32
|
outputFormat: "json";
|
|
62
33
|
status: 200;
|
|
63
|
-
}
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
} & {
|
|
37
|
+
"/me": {
|
|
38
|
+
$put: {
|
|
64
39
|
input: {
|
|
65
40
|
json: {
|
|
66
41
|
userForm: {
|
|
@@ -97,23 +72,36 @@ export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>
|
|
|
97
72
|
};
|
|
98
73
|
outputFormat: "json";
|
|
99
74
|
status: 401;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
} & {
|
|
103
|
-
"/me/theme": {
|
|
104
|
-
$patch: {
|
|
75
|
+
} | {
|
|
105
76
|
input: {
|
|
106
77
|
json: {
|
|
107
|
-
|
|
78
|
+
userForm: {
|
|
79
|
+
name: string;
|
|
80
|
+
email: string;
|
|
81
|
+
lang: "en" | "ja";
|
|
82
|
+
};
|
|
108
83
|
};
|
|
109
84
|
};
|
|
110
85
|
output: {
|
|
111
|
-
|
|
86
|
+
id: string;
|
|
87
|
+
username: string;
|
|
88
|
+
name: string;
|
|
89
|
+
email: string;
|
|
90
|
+
lang: "en" | "ja";
|
|
112
91
|
theme: "system" | "light" | "dark";
|
|
92
|
+
image: string | null;
|
|
93
|
+
hasPassword: boolean;
|
|
94
|
+
createdAt: string;
|
|
95
|
+
introduction?: string | undefined;
|
|
96
|
+
emailChangePending?: boolean | undefined;
|
|
113
97
|
};
|
|
114
98
|
outputFormat: "json";
|
|
115
99
|
status: 200;
|
|
116
|
-
}
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
} & {
|
|
103
|
+
"/me/theme": {
|
|
104
|
+
$patch: {
|
|
117
105
|
input: {
|
|
118
106
|
json: {
|
|
119
107
|
theme: "system" | "light" | "dark";
|
|
@@ -142,24 +130,23 @@ export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>
|
|
|
142
130
|
};
|
|
143
131
|
outputFormat: "json";
|
|
144
132
|
status: 401;
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
} & {
|
|
148
|
-
"/me/picture": {
|
|
149
|
-
$post: {
|
|
133
|
+
} | {
|
|
150
134
|
input: {
|
|
151
|
-
|
|
152
|
-
|
|
135
|
+
json: {
|
|
136
|
+
theme: "system" | "light" | "dark";
|
|
153
137
|
};
|
|
154
138
|
};
|
|
155
139
|
output: {
|
|
156
|
-
status:
|
|
157
|
-
|
|
158
|
-
message?: string | undefined;
|
|
140
|
+
status: "ok";
|
|
141
|
+
theme: "system" | "light" | "dark";
|
|
159
142
|
};
|
|
160
143
|
outputFormat: "json";
|
|
161
144
|
status: 200;
|
|
162
|
-
}
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
} & {
|
|
148
|
+
"/me/picture": {
|
|
149
|
+
$post: {
|
|
163
150
|
input: {
|
|
164
151
|
form: {
|
|
165
152
|
file?: any;
|
|
@@ -188,19 +175,24 @@ export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>
|
|
|
188
175
|
};
|
|
189
176
|
outputFormat: "json";
|
|
190
177
|
status: 401;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
178
|
+
} | {
|
|
179
|
+
input: {
|
|
180
|
+
form: {
|
|
181
|
+
file?: any;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
197
184
|
output: {
|
|
198
|
-
status:
|
|
185
|
+
status: boolean;
|
|
186
|
+
url?: string | undefined;
|
|
199
187
|
message?: string | undefined;
|
|
200
188
|
};
|
|
201
189
|
outputFormat: "json";
|
|
202
190
|
status: 200;
|
|
203
|
-
}
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
} & {
|
|
194
|
+
"/me/picture": {
|
|
195
|
+
$delete: {
|
|
204
196
|
input: {};
|
|
205
197
|
output: {
|
|
206
198
|
status: "error";
|
|
@@ -221,6 +213,14 @@ export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>
|
|
|
221
213
|
};
|
|
222
214
|
outputFormat: "json";
|
|
223
215
|
status: 401;
|
|
216
|
+
} | {
|
|
217
|
+
input: {};
|
|
218
|
+
output: {
|
|
219
|
+
status: "ok";
|
|
220
|
+
message?: string | undefined;
|
|
221
|
+
};
|
|
222
|
+
outputFormat: "json";
|
|
223
|
+
status: 200;
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
226
|
} & {
|
|
@@ -234,11 +234,12 @@ export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>
|
|
|
234
234
|
};
|
|
235
235
|
};
|
|
236
236
|
output: {
|
|
237
|
-
status: "
|
|
237
|
+
status: "error";
|
|
238
238
|
message: string;
|
|
239
|
+
errors?: string[] | undefined;
|
|
239
240
|
};
|
|
240
241
|
outputFormat: "json";
|
|
241
|
-
status:
|
|
242
|
+
status: 400;
|
|
242
243
|
} | {
|
|
243
244
|
input: {
|
|
244
245
|
json: {
|
|
@@ -248,12 +249,14 @@ export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>
|
|
|
248
249
|
};
|
|
249
250
|
};
|
|
250
251
|
output: {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
error: {
|
|
253
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
254
|
+
message: "Authentication is required";
|
|
255
|
+
redirectTo?: string | undefined;
|
|
256
|
+
};
|
|
254
257
|
};
|
|
255
258
|
outputFormat: "json";
|
|
256
|
-
status:
|
|
259
|
+
status: 401;
|
|
257
260
|
} | {
|
|
258
261
|
input: {
|
|
259
262
|
json: {
|
|
@@ -262,6 +265,28 @@ export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>
|
|
|
262
265
|
oldPassword?: string | undefined;
|
|
263
266
|
};
|
|
264
267
|
};
|
|
268
|
+
output: {
|
|
269
|
+
status: "ok";
|
|
270
|
+
message: string;
|
|
271
|
+
};
|
|
272
|
+
outputFormat: "json";
|
|
273
|
+
status: 200;
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
} & {
|
|
277
|
+
"/me/recently-viewed-pages": {
|
|
278
|
+
$get: {
|
|
279
|
+
input: {};
|
|
280
|
+
output: {
|
|
281
|
+
error: {
|
|
282
|
+
code: "INTERNAL_ERROR";
|
|
283
|
+
message: "Internal server error";
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
outputFormat: "json";
|
|
287
|
+
status: 500;
|
|
288
|
+
} | {
|
|
289
|
+
input: {};
|
|
265
290
|
output: {
|
|
266
291
|
error: {
|
|
267
292
|
code: "AUTHENTICATION_REQUIRED";
|
|
@@ -271,11 +296,7 @@ export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>
|
|
|
271
296
|
};
|
|
272
297
|
outputFormat: "json";
|
|
273
298
|
status: 401;
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
} & {
|
|
277
|
-
"/me/recently-viewed-pages": {
|
|
278
|
-
$get: {
|
|
299
|
+
} | {
|
|
279
300
|
input: {};
|
|
280
301
|
output: {
|
|
281
302
|
pages: {
|
|
@@ -340,7 +361,7 @@ export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>
|
|
|
340
361
|
editVia?: "web" | "oauth" | "pat" | undefined;
|
|
341
362
|
} | undefined;
|
|
342
363
|
redirectTo?: string | null | undefined;
|
|
343
|
-
status?: "
|
|
364
|
+
status?: "published" | "wip" | "deleted" | "deprecated" | "draft" | null | undefined;
|
|
344
365
|
grant?: number | undefined;
|
|
345
366
|
grantedUsers?: string[] | undefined;
|
|
346
367
|
creator?: string | {
|
|
@@ -375,27 +396,6 @@ export declare const registerMeRoutes: <E extends OpenAPIHono<CrowiHonoBindings>
|
|
|
375
396
|
};
|
|
376
397
|
outputFormat: "json";
|
|
377
398
|
status: 200;
|
|
378
|
-
} | {
|
|
379
|
-
input: {};
|
|
380
|
-
output: {
|
|
381
|
-
error: {
|
|
382
|
-
code: "AUTHENTICATION_REQUIRED";
|
|
383
|
-
message: "Authentication is required";
|
|
384
|
-
redirectTo?: string | undefined;
|
|
385
|
-
};
|
|
386
|
-
};
|
|
387
|
-
outputFormat: "json";
|
|
388
|
-
status: 401;
|
|
389
|
-
} | {
|
|
390
|
-
input: {};
|
|
391
|
-
output: {
|
|
392
|
-
error: {
|
|
393
|
-
code: "INTERNAL_ERROR";
|
|
394
|
-
message: "Internal server error";
|
|
395
|
-
};
|
|
396
|
-
};
|
|
397
|
-
outputFormat: "json";
|
|
398
|
-
status: 500;
|
|
399
399
|
};
|
|
400
400
|
};
|
|
401
401
|
}, "/">;
|
|
@@ -4,6 +4,37 @@ import type { CrowiHonoBindings } from '../app';
|
|
|
4
4
|
export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHonoBindings>>(app: E, crowi: Crowi) => OpenAPIHono<CrowiHonoBindings, {
|
|
5
5
|
"/notifications": {
|
|
6
6
|
$get: {
|
|
7
|
+
input: {
|
|
8
|
+
query: {
|
|
9
|
+
limit?: unknown;
|
|
10
|
+
offset?: unknown;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
output: {
|
|
14
|
+
error: {
|
|
15
|
+
code: "INTERNAL_ERROR";
|
|
16
|
+
message: "Internal server error";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
outputFormat: "json";
|
|
20
|
+
status: 500;
|
|
21
|
+
} | {
|
|
22
|
+
input: {
|
|
23
|
+
query: {
|
|
24
|
+
limit?: unknown;
|
|
25
|
+
offset?: unknown;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
output: {
|
|
29
|
+
error: {
|
|
30
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
31
|
+
message: "Authentication is required";
|
|
32
|
+
redirectTo?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
outputFormat: "json";
|
|
36
|
+
status: 401;
|
|
37
|
+
} | {
|
|
7
38
|
input: {
|
|
8
39
|
query: {
|
|
9
40
|
limit?: unknown;
|
|
@@ -18,7 +49,7 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
18
49
|
target: {
|
|
19
50
|
path: string;
|
|
20
51
|
_id: string;
|
|
21
|
-
status?: "
|
|
52
|
+
status?: "published" | "wip" | "deleted" | "deprecated" | "draft" | null | undefined;
|
|
22
53
|
};
|
|
23
54
|
action: "COMMENT" | "LIKE" | "MENTION" | "UPDATE";
|
|
24
55
|
status: "UNREAD" | "UNOPENED" | "OPENED";
|
|
@@ -44,37 +75,6 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
44
75
|
};
|
|
45
76
|
outputFormat: "json";
|
|
46
77
|
status: 200;
|
|
47
|
-
} | {
|
|
48
|
-
input: {
|
|
49
|
-
query: {
|
|
50
|
-
limit?: unknown;
|
|
51
|
-
offset?: unknown;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
output: {
|
|
55
|
-
error: {
|
|
56
|
-
code: "AUTHENTICATION_REQUIRED";
|
|
57
|
-
message: "Authentication is required";
|
|
58
|
-
redirectTo?: string | undefined;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
outputFormat: "json";
|
|
62
|
-
status: 401;
|
|
63
|
-
} | {
|
|
64
|
-
input: {
|
|
65
|
-
query: {
|
|
66
|
-
limit?: unknown;
|
|
67
|
-
offset?: unknown;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
output: {
|
|
71
|
-
error: {
|
|
72
|
-
code: "INTERNAL_ERROR";
|
|
73
|
-
message: "Internal server error";
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
outputFormat: "json";
|
|
77
|
-
status: 500;
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
80
|
} & {
|
|
@@ -82,10 +82,13 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
82
82
|
$post: {
|
|
83
83
|
input: {};
|
|
84
84
|
output: {
|
|
85
|
-
|
|
85
|
+
error: {
|
|
86
|
+
code: "INTERNAL_ERROR";
|
|
87
|
+
message: "Internal server error";
|
|
88
|
+
};
|
|
86
89
|
};
|
|
87
90
|
outputFormat: "json";
|
|
88
|
-
status:
|
|
91
|
+
status: 500;
|
|
89
92
|
} | {
|
|
90
93
|
input: {};
|
|
91
94
|
output: {
|
|
@@ -100,13 +103,10 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
100
103
|
} | {
|
|
101
104
|
input: {};
|
|
102
105
|
output: {
|
|
103
|
-
|
|
104
|
-
code: "INTERNAL_ERROR";
|
|
105
|
-
message: "Internal server error";
|
|
106
|
-
};
|
|
106
|
+
ok: true;
|
|
107
107
|
};
|
|
108
108
|
outputFormat: "json";
|
|
109
|
-
status:
|
|
109
|
+
status: 200;
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
} & {
|
|
@@ -114,12 +114,13 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
114
114
|
$get: {
|
|
115
115
|
input: {};
|
|
116
116
|
output: {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
error: {
|
|
118
|
+
code: "INTERNAL_ERROR";
|
|
119
|
+
message: "Internal server error";
|
|
120
|
+
};
|
|
120
121
|
};
|
|
121
122
|
outputFormat: "json";
|
|
122
|
-
status:
|
|
123
|
+
status: 500;
|
|
123
124
|
} | {
|
|
124
125
|
input: {};
|
|
125
126
|
output: {
|
|
@@ -134,13 +135,12 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
134
135
|
} | {
|
|
135
136
|
input: {};
|
|
136
137
|
output: {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
};
|
|
138
|
+
token: string;
|
|
139
|
+
selfUserId: string;
|
|
140
|
+
expiresAt: string;
|
|
141
141
|
};
|
|
142
142
|
outputFormat: "json";
|
|
143
|
-
status:
|
|
143
|
+
status: 200;
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
146
|
} & {
|
|
@@ -148,10 +148,13 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
148
148
|
$get: {
|
|
149
149
|
input: {};
|
|
150
150
|
output: {
|
|
151
|
-
|
|
151
|
+
error: {
|
|
152
|
+
code: "INTERNAL_ERROR";
|
|
153
|
+
message: "Internal server error";
|
|
154
|
+
};
|
|
152
155
|
};
|
|
153
156
|
outputFormat: "json";
|
|
154
|
-
status:
|
|
157
|
+
status: 500;
|
|
155
158
|
} | {
|
|
156
159
|
input: {};
|
|
157
160
|
output: {
|
|
@@ -166,13 +169,10 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
166
169
|
} | {
|
|
167
170
|
input: {};
|
|
168
171
|
output: {
|
|
169
|
-
|
|
170
|
-
code: "INTERNAL_ERROR";
|
|
171
|
-
message: "Internal server error";
|
|
172
|
-
};
|
|
172
|
+
count: number;
|
|
173
173
|
};
|
|
174
174
|
outputFormat: "json";
|
|
175
|
-
status:
|
|
175
|
+
status: 200;
|
|
176
176
|
};
|
|
177
177
|
};
|
|
178
178
|
} & {
|
|
@@ -184,34 +184,13 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
184
184
|
};
|
|
185
185
|
};
|
|
186
186
|
output: {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
targetModel: "Page";
|
|
191
|
-
target: {
|
|
192
|
-
path: string;
|
|
193
|
-
_id: string;
|
|
194
|
-
status?: "deleted" | "deprecated" | "published" | "wip" | "draft" | null | undefined;
|
|
195
|
-
};
|
|
196
|
-
action: "COMMENT" | "LIKE" | "MENTION" | "UPDATE";
|
|
197
|
-
status: "UNREAD" | "UNOPENED" | "OPENED";
|
|
198
|
-
actionUsers: {
|
|
199
|
-
_id: string;
|
|
200
|
-
username: string;
|
|
201
|
-
name: string;
|
|
202
|
-
email: string;
|
|
203
|
-
createdAt: string;
|
|
204
|
-
id?: string | undefined;
|
|
205
|
-
image?: string | null | undefined;
|
|
206
|
-
introduction?: string | undefined;
|
|
207
|
-
admin?: boolean | undefined;
|
|
208
|
-
status?: 1 | 2 | 3 | 4 | 5 | undefined;
|
|
209
|
-
}[];
|
|
210
|
-
createdAt: string;
|
|
187
|
+
error: {
|
|
188
|
+
code: "INTERNAL_ERROR";
|
|
189
|
+
message: "Internal server error";
|
|
211
190
|
};
|
|
212
191
|
};
|
|
213
192
|
outputFormat: "json";
|
|
214
|
-
status:
|
|
193
|
+
status: 500;
|
|
215
194
|
} | {
|
|
216
195
|
input: {
|
|
217
196
|
param: {
|
|
@@ -220,12 +199,12 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
220
199
|
};
|
|
221
200
|
output: {
|
|
222
201
|
error: {
|
|
223
|
-
code: "
|
|
224
|
-
message:
|
|
202
|
+
code: "NOTIFICATION_NOT_FOUND";
|
|
203
|
+
message: "Notification not found";
|
|
225
204
|
};
|
|
226
205
|
};
|
|
227
206
|
outputFormat: "json";
|
|
228
|
-
status:
|
|
207
|
+
status: 404;
|
|
229
208
|
} | {
|
|
230
209
|
input: {
|
|
231
210
|
param: {
|
|
@@ -234,13 +213,12 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
234
213
|
};
|
|
235
214
|
output: {
|
|
236
215
|
error: {
|
|
237
|
-
code: "
|
|
238
|
-
message:
|
|
239
|
-
redirectTo?: string | undefined;
|
|
216
|
+
code: "INVALID_REQUEST";
|
|
217
|
+
message: string;
|
|
240
218
|
};
|
|
241
219
|
};
|
|
242
220
|
outputFormat: "json";
|
|
243
|
-
status:
|
|
221
|
+
status: 400;
|
|
244
222
|
} | {
|
|
245
223
|
input: {
|
|
246
224
|
param: {
|
|
@@ -249,12 +227,13 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
249
227
|
};
|
|
250
228
|
output: {
|
|
251
229
|
error: {
|
|
252
|
-
code: "
|
|
253
|
-
message: "
|
|
230
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
231
|
+
message: "Authentication is required";
|
|
232
|
+
redirectTo?: string | undefined;
|
|
254
233
|
};
|
|
255
234
|
};
|
|
256
235
|
outputFormat: "json";
|
|
257
|
-
status:
|
|
236
|
+
status: 401;
|
|
258
237
|
} | {
|
|
259
238
|
input: {
|
|
260
239
|
param: {
|
|
@@ -262,13 +241,34 @@ export declare const registerNotificationRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
262
241
|
};
|
|
263
242
|
};
|
|
264
243
|
output: {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
244
|
+
notification: {
|
|
245
|
+
_id: string;
|
|
246
|
+
user: string;
|
|
247
|
+
targetModel: "Page";
|
|
248
|
+
target: {
|
|
249
|
+
path: string;
|
|
250
|
+
_id: string;
|
|
251
|
+
status?: "published" | "wip" | "deleted" | "deprecated" | "draft" | null | undefined;
|
|
252
|
+
};
|
|
253
|
+
action: "COMMENT" | "LIKE" | "MENTION" | "UPDATE";
|
|
254
|
+
status: "UNREAD" | "UNOPENED" | "OPENED";
|
|
255
|
+
actionUsers: {
|
|
256
|
+
_id: string;
|
|
257
|
+
username: string;
|
|
258
|
+
name: string;
|
|
259
|
+
email: string;
|
|
260
|
+
createdAt: string;
|
|
261
|
+
id?: string | undefined;
|
|
262
|
+
image?: string | null | undefined;
|
|
263
|
+
introduction?: string | undefined;
|
|
264
|
+
admin?: boolean | undefined;
|
|
265
|
+
status?: 1 | 2 | 3 | 4 | 5 | undefined;
|
|
266
|
+
}[];
|
|
267
|
+
createdAt: string;
|
|
268
268
|
};
|
|
269
269
|
};
|
|
270
270
|
outputFormat: "json";
|
|
271
|
-
status:
|
|
271
|
+
status: 200;
|
|
272
272
|
};
|
|
273
273
|
};
|
|
274
274
|
}, "/">;
|