@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
|
@@ -8,27 +8,7 @@ export declare const registerAutocompleteRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
8
8
|
query: {
|
|
9
9
|
q: string;
|
|
10
10
|
limit?: unknown;
|
|
11
|
-
anchor?: "
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
output: {
|
|
15
|
-
results: {
|
|
16
|
-
id: string;
|
|
17
|
-
label: string;
|
|
18
|
-
display: string;
|
|
19
|
-
score: number;
|
|
20
|
-
avatar?: string | null | undefined;
|
|
21
|
-
modifiedAt?: string | null | undefined;
|
|
22
|
-
}[];
|
|
23
|
-
};
|
|
24
|
-
outputFormat: "json";
|
|
25
|
-
status: 200;
|
|
26
|
-
} | {
|
|
27
|
-
input: {
|
|
28
|
-
query: {
|
|
29
|
-
q: string;
|
|
30
|
-
limit?: unknown;
|
|
31
|
-
anchor?: "substring" | "prefix" | undefined;
|
|
11
|
+
anchor?: "prefix" | "substring" | undefined;
|
|
32
12
|
};
|
|
33
13
|
};
|
|
34
14
|
output: {
|
|
@@ -50,7 +30,7 @@ export declare const registerAutocompleteRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
50
30
|
query: {
|
|
51
31
|
q: string;
|
|
52
32
|
limit?: unknown;
|
|
53
|
-
anchor?: "
|
|
33
|
+
anchor?: "prefix" | "substring" | undefined;
|
|
54
34
|
};
|
|
55
35
|
};
|
|
56
36
|
output: {
|
|
@@ -67,26 +47,7 @@ export declare const registerAutocompleteRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
67
47
|
query: {
|
|
68
48
|
q: string;
|
|
69
49
|
limit?: unknown;
|
|
70
|
-
anchor?: "
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
output: {
|
|
74
|
-
error: "rate_limited";
|
|
75
|
-
message: string;
|
|
76
|
-
retryAfterSeconds: number;
|
|
77
|
-
};
|
|
78
|
-
outputFormat: "json";
|
|
79
|
-
status: 429;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
} & {
|
|
83
|
-
"/pages/autocomplete": {
|
|
84
|
-
$get: {
|
|
85
|
-
input: {
|
|
86
|
-
query: {
|
|
87
|
-
q: string;
|
|
88
|
-
limit?: unknown;
|
|
89
|
-
anchor?: "substring" | "prefix" | undefined;
|
|
50
|
+
anchor?: "prefix" | "substring" | undefined;
|
|
90
51
|
};
|
|
91
52
|
};
|
|
92
53
|
output: {
|
|
@@ -106,7 +67,26 @@ export declare const registerAutocompleteRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
106
67
|
query: {
|
|
107
68
|
q: string;
|
|
108
69
|
limit?: unknown;
|
|
109
|
-
anchor?: "
|
|
70
|
+
anchor?: "prefix" | "substring" | undefined;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
output: {
|
|
74
|
+
error: "rate_limited";
|
|
75
|
+
message: string;
|
|
76
|
+
retryAfterSeconds: number;
|
|
77
|
+
};
|
|
78
|
+
outputFormat: "json";
|
|
79
|
+
status: 429;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
} & {
|
|
83
|
+
"/pages/autocomplete": {
|
|
84
|
+
$get: {
|
|
85
|
+
input: {
|
|
86
|
+
query: {
|
|
87
|
+
q: string;
|
|
88
|
+
limit?: unknown;
|
|
89
|
+
anchor?: "prefix" | "substring" | undefined;
|
|
110
90
|
};
|
|
111
91
|
};
|
|
112
92
|
output: {
|
|
@@ -128,7 +108,7 @@ export declare const registerAutocompleteRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
128
108
|
query: {
|
|
129
109
|
q: string;
|
|
130
110
|
limit?: unknown;
|
|
131
|
-
anchor?: "
|
|
111
|
+
anchor?: "prefix" | "substring" | undefined;
|
|
132
112
|
};
|
|
133
113
|
};
|
|
134
114
|
output: {
|
|
@@ -145,7 +125,27 @@ export declare const registerAutocompleteRoutes: <E extends OpenAPIHono<CrowiHon
|
|
|
145
125
|
query: {
|
|
146
126
|
q: string;
|
|
147
127
|
limit?: unknown;
|
|
148
|
-
anchor?: "
|
|
128
|
+
anchor?: "prefix" | "substring" | undefined;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
output: {
|
|
132
|
+
results: {
|
|
133
|
+
id: string;
|
|
134
|
+
label: string;
|
|
135
|
+
display: string;
|
|
136
|
+
score: number;
|
|
137
|
+
avatar?: string | null | undefined;
|
|
138
|
+
modifiedAt?: string | null | undefined;
|
|
139
|
+
}[];
|
|
140
|
+
};
|
|
141
|
+
outputFormat: "json";
|
|
142
|
+
status: 200;
|
|
143
|
+
} | {
|
|
144
|
+
input: {
|
|
145
|
+
query: {
|
|
146
|
+
q: string;
|
|
147
|
+
limit?: unknown;
|
|
148
|
+
anchor?: "prefix" | "substring" | undefined;
|
|
149
149
|
};
|
|
150
150
|
};
|
|
151
151
|
output: {
|
|
@@ -4,6 +4,39 @@ import type { CrowiHonoBindings } from '../app';
|
|
|
4
4
|
export declare const registerBacklinkRoutes: <E extends OpenAPIHono<CrowiHonoBindings>>(app: E, crowi: Crowi) => OpenAPIHono<CrowiHonoBindings, {
|
|
5
5
|
"/backlinks": {
|
|
6
6
|
$get: {
|
|
7
|
+
input: {
|
|
8
|
+
query: {
|
|
9
|
+
page_id: string;
|
|
10
|
+
limit?: unknown;
|
|
11
|
+
offset?: unknown;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
output: {
|
|
15
|
+
error: {
|
|
16
|
+
code: "INVALID_PAGE_ID";
|
|
17
|
+
message: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
outputFormat: "json";
|
|
21
|
+
status: 400;
|
|
22
|
+
} | {
|
|
23
|
+
input: {
|
|
24
|
+
query: {
|
|
25
|
+
page_id: string;
|
|
26
|
+
limit?: unknown;
|
|
27
|
+
offset?: unknown;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
output: {
|
|
31
|
+
error: {
|
|
32
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
33
|
+
message: "Authentication is required";
|
|
34
|
+
redirectTo?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
outputFormat: "json";
|
|
38
|
+
status: 401;
|
|
39
|
+
} | {
|
|
7
40
|
input: {
|
|
8
41
|
query: {
|
|
9
42
|
page_id: string;
|
|
@@ -40,39 +73,6 @@ export declare const registerBacklinkRoutes: <E extends OpenAPIHono<CrowiHonoBin
|
|
|
40
73
|
};
|
|
41
74
|
outputFormat: "json";
|
|
42
75
|
status: 200;
|
|
43
|
-
} | {
|
|
44
|
-
input: {
|
|
45
|
-
query: {
|
|
46
|
-
page_id: string;
|
|
47
|
-
limit?: unknown;
|
|
48
|
-
offset?: unknown;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
output: {
|
|
52
|
-
error: {
|
|
53
|
-
code: "INVALID_PAGE_ID";
|
|
54
|
-
message: string;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
outputFormat: "json";
|
|
58
|
-
status: 400;
|
|
59
|
-
} | {
|
|
60
|
-
input: {
|
|
61
|
-
query: {
|
|
62
|
-
page_id: string;
|
|
63
|
-
limit?: unknown;
|
|
64
|
-
offset?: unknown;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
output: {
|
|
68
|
-
error: {
|
|
69
|
-
code: "AUTHENTICATION_REQUIRED";
|
|
70
|
-
message: "Authentication is required";
|
|
71
|
-
redirectTo?: string | undefined;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
outputFormat: "json";
|
|
75
|
-
status: 401;
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
78
|
}, "/">;
|
|
@@ -4,6 +4,49 @@ import type { CrowiHonoBindings } from '../app';
|
|
|
4
4
|
export declare const registerBookmarkRoutes: <E extends OpenAPIHono<CrowiHonoBindings>>(app: E, crowi: Crowi) => OpenAPIHono<CrowiHonoBindings, {
|
|
5
5
|
"/bookmarks": {
|
|
6
6
|
$get: {
|
|
7
|
+
input: {
|
|
8
|
+
query: {
|
|
9
|
+
page_id: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
output: {
|
|
13
|
+
error: {
|
|
14
|
+
code: "INTERNAL_ERROR";
|
|
15
|
+
message: "Internal server error";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
outputFormat: "json";
|
|
19
|
+
status: 500;
|
|
20
|
+
} | {
|
|
21
|
+
input: {
|
|
22
|
+
query: {
|
|
23
|
+
page_id: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
output: {
|
|
27
|
+
error: {
|
|
28
|
+
code: "INVALID_PAGE_ID";
|
|
29
|
+
message: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
outputFormat: "json";
|
|
33
|
+
status: 400;
|
|
34
|
+
} | {
|
|
35
|
+
input: {
|
|
36
|
+
query: {
|
|
37
|
+
page_id: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
output: {
|
|
41
|
+
error: {
|
|
42
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
43
|
+
message: "Authentication is required";
|
|
44
|
+
redirectTo?: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
outputFormat: "json";
|
|
48
|
+
status: 401;
|
|
49
|
+
} | {
|
|
7
50
|
input: {
|
|
8
51
|
query: {
|
|
9
52
|
page_id: string;
|
|
@@ -74,7 +117,7 @@ export declare const registerBookmarkRoutes: <E extends OpenAPIHono<CrowiHonoBin
|
|
|
74
117
|
editVia?: "web" | "oauth" | "pat" | undefined;
|
|
75
118
|
} | undefined;
|
|
76
119
|
redirectTo?: string | null | undefined;
|
|
77
|
-
status?: "
|
|
120
|
+
status?: "published" | "wip" | "deleted" | "deprecated" | "draft" | null | undefined;
|
|
78
121
|
grant?: number | undefined;
|
|
79
122
|
grantedUsers?: string[] | undefined;
|
|
80
123
|
creator?: string | {
|
|
@@ -123,24 +166,30 @@ export declare const registerBookmarkRoutes: <E extends OpenAPIHono<CrowiHonoBin
|
|
|
123
166
|
};
|
|
124
167
|
outputFormat: "json";
|
|
125
168
|
status: 200;
|
|
126
|
-
}
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
} & {
|
|
172
|
+
"/bookmarks/me": {
|
|
173
|
+
$get: {
|
|
127
174
|
input: {
|
|
128
175
|
query: {
|
|
129
|
-
|
|
176
|
+
limit?: unknown;
|
|
177
|
+
offset?: unknown;
|
|
130
178
|
};
|
|
131
179
|
};
|
|
132
180
|
output: {
|
|
133
181
|
error: {
|
|
134
|
-
code: "
|
|
135
|
-
message:
|
|
182
|
+
code: "INTERNAL_ERROR";
|
|
183
|
+
message: "Internal server error";
|
|
136
184
|
};
|
|
137
185
|
};
|
|
138
186
|
outputFormat: "json";
|
|
139
|
-
status:
|
|
187
|
+
status: 500;
|
|
140
188
|
} | {
|
|
141
189
|
input: {
|
|
142
190
|
query: {
|
|
143
|
-
|
|
191
|
+
limit?: unknown;
|
|
192
|
+
offset?: unknown;
|
|
144
193
|
};
|
|
145
194
|
};
|
|
146
195
|
output: {
|
|
@@ -153,24 +202,6 @@ export declare const registerBookmarkRoutes: <E extends OpenAPIHono<CrowiHonoBin
|
|
|
153
202
|
outputFormat: "json";
|
|
154
203
|
status: 401;
|
|
155
204
|
} | {
|
|
156
|
-
input: {
|
|
157
|
-
query: {
|
|
158
|
-
page_id: string;
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
output: {
|
|
162
|
-
error: {
|
|
163
|
-
code: "INTERNAL_ERROR";
|
|
164
|
-
message: "Internal server error";
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
outputFormat: "json";
|
|
168
|
-
status: 500;
|
|
169
|
-
};
|
|
170
|
-
};
|
|
171
|
-
} & {
|
|
172
|
-
"/bookmarks/me": {
|
|
173
|
-
$get: {
|
|
174
205
|
input: {
|
|
175
206
|
query: {
|
|
176
207
|
limit?: unknown;
|
|
@@ -242,7 +273,7 @@ export declare const registerBookmarkRoutes: <E extends OpenAPIHono<CrowiHonoBin
|
|
|
242
273
|
editVia?: "web" | "oauth" | "pat" | undefined;
|
|
243
274
|
} | undefined;
|
|
244
275
|
redirectTo?: string | null | undefined;
|
|
245
|
-
status?: "
|
|
276
|
+
status?: "published" | "wip" | "deleted" | "deprecated" | "draft" | null | undefined;
|
|
246
277
|
grant?: number | undefined;
|
|
247
278
|
grantedUsers?: string[] | undefined;
|
|
248
279
|
creator?: string | {
|
|
@@ -297,42 +328,54 @@ export declare const registerBookmarkRoutes: <E extends OpenAPIHono<CrowiHonoBin
|
|
|
297
328
|
};
|
|
298
329
|
outputFormat: "json";
|
|
299
330
|
status: 200;
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
} & {
|
|
334
|
+
"/bookmarks": {
|
|
335
|
+
$post: {
|
|
336
|
+
input: {
|
|
337
|
+
json: {
|
|
338
|
+
page_id: string;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
output: {
|
|
342
|
+
error: {
|
|
343
|
+
code: "INTERNAL_ERROR";
|
|
344
|
+
message: "Internal server error";
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
outputFormat: "json";
|
|
348
|
+
status: 500;
|
|
300
349
|
} | {
|
|
301
350
|
input: {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
offset?: unknown;
|
|
351
|
+
json: {
|
|
352
|
+
page_id: string;
|
|
305
353
|
};
|
|
306
354
|
};
|
|
307
355
|
output: {
|
|
308
356
|
error: {
|
|
309
|
-
code: "
|
|
310
|
-
message:
|
|
311
|
-
redirectTo?: string | undefined;
|
|
357
|
+
code: "INVALID_PAGE_ID";
|
|
358
|
+
message: string;
|
|
312
359
|
};
|
|
313
360
|
};
|
|
314
361
|
outputFormat: "json";
|
|
315
|
-
status:
|
|
362
|
+
status: 400;
|
|
316
363
|
} | {
|
|
317
364
|
input: {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
offset?: unknown;
|
|
365
|
+
json: {
|
|
366
|
+
page_id: string;
|
|
321
367
|
};
|
|
322
368
|
};
|
|
323
369
|
output: {
|
|
324
370
|
error: {
|
|
325
|
-
code: "
|
|
326
|
-
message: "
|
|
371
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
372
|
+
message: "Authentication is required";
|
|
373
|
+
redirectTo?: string | undefined;
|
|
327
374
|
};
|
|
328
375
|
};
|
|
329
376
|
outputFormat: "json";
|
|
330
|
-
status:
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
} & {
|
|
334
|
-
"/bookmarks": {
|
|
335
|
-
$post: {
|
|
377
|
+
status: 401;
|
|
378
|
+
} | {
|
|
336
379
|
input: {
|
|
337
380
|
json: {
|
|
338
381
|
page_id: string;
|
|
@@ -403,7 +446,7 @@ export declare const registerBookmarkRoutes: <E extends OpenAPIHono<CrowiHonoBin
|
|
|
403
446
|
editVia?: "web" | "oauth" | "pat" | undefined;
|
|
404
447
|
} | undefined;
|
|
405
448
|
redirectTo?: string | null | undefined;
|
|
406
|
-
status?: "
|
|
449
|
+
status?: "published" | "wip" | "deleted" | "deprecated" | "draft" | null | undefined;
|
|
407
450
|
grant?: number | undefined;
|
|
408
451
|
grantedUsers?: string[] | undefined;
|
|
409
452
|
creator?: string | {
|
|
@@ -452,49 +495,6 @@ export declare const registerBookmarkRoutes: <E extends OpenAPIHono<CrowiHonoBin
|
|
|
452
495
|
};
|
|
453
496
|
outputFormat: "json";
|
|
454
497
|
status: 200;
|
|
455
|
-
} | {
|
|
456
|
-
input: {
|
|
457
|
-
json: {
|
|
458
|
-
page_id: string;
|
|
459
|
-
};
|
|
460
|
-
};
|
|
461
|
-
output: {
|
|
462
|
-
error: {
|
|
463
|
-
code: "INVALID_PAGE_ID";
|
|
464
|
-
message: string;
|
|
465
|
-
};
|
|
466
|
-
};
|
|
467
|
-
outputFormat: "json";
|
|
468
|
-
status: 400;
|
|
469
|
-
} | {
|
|
470
|
-
input: {
|
|
471
|
-
json: {
|
|
472
|
-
page_id: string;
|
|
473
|
-
};
|
|
474
|
-
};
|
|
475
|
-
output: {
|
|
476
|
-
error: {
|
|
477
|
-
code: "AUTHENTICATION_REQUIRED";
|
|
478
|
-
message: "Authentication is required";
|
|
479
|
-
redirectTo?: string | undefined;
|
|
480
|
-
};
|
|
481
|
-
};
|
|
482
|
-
outputFormat: "json";
|
|
483
|
-
status: 401;
|
|
484
|
-
} | {
|
|
485
|
-
input: {
|
|
486
|
-
json: {
|
|
487
|
-
page_id: string;
|
|
488
|
-
};
|
|
489
|
-
};
|
|
490
|
-
output: {
|
|
491
|
-
error: {
|
|
492
|
-
code: "INTERNAL_ERROR";
|
|
493
|
-
message: "Internal server error";
|
|
494
|
-
};
|
|
495
|
-
};
|
|
496
|
-
outputFormat: "json";
|
|
497
|
-
status: 500;
|
|
498
498
|
};
|
|
499
499
|
};
|
|
500
500
|
} & {
|
|
@@ -506,10 +506,13 @@ export declare const registerBookmarkRoutes: <E extends OpenAPIHono<CrowiHonoBin
|
|
|
506
506
|
};
|
|
507
507
|
};
|
|
508
508
|
output: {
|
|
509
|
-
|
|
509
|
+
error: {
|
|
510
|
+
code: "INTERNAL_ERROR";
|
|
511
|
+
message: "Internal server error";
|
|
512
|
+
};
|
|
510
513
|
};
|
|
511
514
|
outputFormat: "json";
|
|
512
|
-
status:
|
|
515
|
+
status: 500;
|
|
513
516
|
} | {
|
|
514
517
|
input: {
|
|
515
518
|
json: {
|
|
@@ -546,13 +549,10 @@ export declare const registerBookmarkRoutes: <E extends OpenAPIHono<CrowiHonoBin
|
|
|
546
549
|
};
|
|
547
550
|
};
|
|
548
551
|
output: {
|
|
549
|
-
|
|
550
|
-
code: "INTERNAL_ERROR";
|
|
551
|
-
message: "Internal server error";
|
|
552
|
-
};
|
|
552
|
+
ok: true;
|
|
553
553
|
};
|
|
554
554
|
outputFormat: "json";
|
|
555
|
-
status:
|
|
555
|
+
status: 200;
|
|
556
556
|
};
|
|
557
557
|
};
|
|
558
558
|
}, "/">;
|
|
@@ -4,34 +4,6 @@ import type { CrowiHonoBindings } from '../app';
|
|
|
4
4
|
export declare const registerCommentRoutes: <E extends OpenAPIHono<CrowiHonoBindings>>(app: E, crowi: Crowi) => OpenAPIHono<CrowiHonoBindings, {
|
|
5
5
|
"/comments": {
|
|
6
6
|
$get: {
|
|
7
|
-
input: {
|
|
8
|
-
query: {
|
|
9
|
-
page_id?: string | undefined;
|
|
10
|
-
revision_id?: string | undefined;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
output: {
|
|
14
|
-
comments: {
|
|
15
|
-
_id: string;
|
|
16
|
-
page: string;
|
|
17
|
-
creator: string | {
|
|
18
|
-
_id: string;
|
|
19
|
-
username: string;
|
|
20
|
-
name: string;
|
|
21
|
-
email: string;
|
|
22
|
-
createdAt: string;
|
|
23
|
-
id?: string | undefined;
|
|
24
|
-
image?: string | null | undefined;
|
|
25
|
-
} | null;
|
|
26
|
-
revision: string;
|
|
27
|
-
comment: string;
|
|
28
|
-
commentPosition: number;
|
|
29
|
-
createdAt: string;
|
|
30
|
-
}[];
|
|
31
|
-
};
|
|
32
|
-
outputFormat: "json";
|
|
33
|
-
status: 200;
|
|
34
|
-
} | {
|
|
35
7
|
input: {
|
|
36
8
|
query: {
|
|
37
9
|
page_id?: string | undefined;
|
|
@@ -62,21 +34,15 @@ export declare const registerCommentRoutes: <E extends OpenAPIHono<CrowiHonoBind
|
|
|
62
34
|
};
|
|
63
35
|
outputFormat: "json";
|
|
64
36
|
status: 401;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
} & {
|
|
68
|
-
"/comments": {
|
|
69
|
-
$post: {
|
|
37
|
+
} | {
|
|
70
38
|
input: {
|
|
71
|
-
|
|
72
|
-
page_id
|
|
73
|
-
revision_id
|
|
74
|
-
comment: string;
|
|
75
|
-
comment_position?: number | undefined;
|
|
39
|
+
query: {
|
|
40
|
+
page_id?: string | undefined;
|
|
41
|
+
revision_id?: string | undefined;
|
|
76
42
|
};
|
|
77
43
|
};
|
|
78
44
|
output: {
|
|
79
|
-
|
|
45
|
+
comments: {
|
|
80
46
|
_id: string;
|
|
81
47
|
page: string;
|
|
82
48
|
creator: string | {
|
|
@@ -92,11 +58,31 @@ export declare const registerCommentRoutes: <E extends OpenAPIHono<CrowiHonoBind
|
|
|
92
58
|
comment: string;
|
|
93
59
|
commentPosition: number;
|
|
94
60
|
createdAt: string;
|
|
95
|
-
};
|
|
96
|
-
newlyWatching: boolean;
|
|
61
|
+
}[];
|
|
97
62
|
};
|
|
98
63
|
outputFormat: "json";
|
|
99
64
|
status: 200;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
} & {
|
|
68
|
+
"/comments": {
|
|
69
|
+
$post: {
|
|
70
|
+
input: {
|
|
71
|
+
json: {
|
|
72
|
+
page_id: string;
|
|
73
|
+
revision_id: string;
|
|
74
|
+
comment: string;
|
|
75
|
+
comment_position?: number | undefined;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
output: {
|
|
79
|
+
error: {
|
|
80
|
+
code: "PAGE_NOT_FOUND";
|
|
81
|
+
message: "Page not found";
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
outputFormat: "json";
|
|
85
|
+
status: 404;
|
|
100
86
|
} | {
|
|
101
87
|
input: {
|
|
102
88
|
json: {
|
|
@@ -142,13 +128,27 @@ export declare const registerCommentRoutes: <E extends OpenAPIHono<CrowiHonoBind
|
|
|
142
128
|
};
|
|
143
129
|
};
|
|
144
130
|
output: {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
131
|
+
comment: {
|
|
132
|
+
_id: string;
|
|
133
|
+
page: string;
|
|
134
|
+
creator: string | {
|
|
135
|
+
_id: string;
|
|
136
|
+
username: string;
|
|
137
|
+
name: string;
|
|
138
|
+
email: string;
|
|
139
|
+
createdAt: string;
|
|
140
|
+
id?: string | undefined;
|
|
141
|
+
image?: string | null | undefined;
|
|
142
|
+
} | null;
|
|
143
|
+
revision: string;
|
|
144
|
+
comment: string;
|
|
145
|
+
commentPosition: number;
|
|
146
|
+
createdAt: string;
|
|
148
147
|
};
|
|
148
|
+
newlyWatching: boolean;
|
|
149
149
|
};
|
|
150
150
|
outputFormat: "json";
|
|
151
|
-
status:
|
|
151
|
+
status: 200;
|
|
152
152
|
};
|
|
153
153
|
};
|
|
154
154
|
} & {
|
|
@@ -161,10 +161,13 @@ export declare const registerCommentRoutes: <E extends OpenAPIHono<CrowiHonoBind
|
|
|
161
161
|
};
|
|
162
162
|
};
|
|
163
163
|
output: {
|
|
164
|
-
|
|
164
|
+
error: {
|
|
165
|
+
code: "COMMENT_NOT_FOUND";
|
|
166
|
+
message: "Comment not found";
|
|
167
|
+
};
|
|
165
168
|
};
|
|
166
169
|
outputFormat: "json";
|
|
167
|
-
status:
|
|
170
|
+
status: 404;
|
|
168
171
|
} | {
|
|
169
172
|
input: {
|
|
170
173
|
json: {
|
|
@@ -204,13 +207,10 @@ export declare const registerCommentRoutes: <E extends OpenAPIHono<CrowiHonoBind
|
|
|
204
207
|
};
|
|
205
208
|
};
|
|
206
209
|
output: {
|
|
207
|
-
|
|
208
|
-
code: "PAGE_NOT_GRANTED";
|
|
209
|
-
message: "Page is not granted for the user";
|
|
210
|
-
};
|
|
210
|
+
ok: true;
|
|
211
211
|
};
|
|
212
212
|
outputFormat: "json";
|
|
213
|
-
status:
|
|
213
|
+
status: 200;
|
|
214
214
|
} | {
|
|
215
215
|
input: {
|
|
216
216
|
json: {
|
|
@@ -220,12 +220,12 @@ export declare const registerCommentRoutes: <E extends OpenAPIHono<CrowiHonoBind
|
|
|
220
220
|
};
|
|
221
221
|
output: {
|
|
222
222
|
error: {
|
|
223
|
-
code: "
|
|
224
|
-
message: "
|
|
223
|
+
code: "PAGE_NOT_GRANTED";
|
|
224
|
+
message: "Page is not granted for the user";
|
|
225
225
|
};
|
|
226
226
|
};
|
|
227
227
|
outputFormat: "json";
|
|
228
|
-
status:
|
|
228
|
+
status: 403;
|
|
229
229
|
};
|
|
230
230
|
};
|
|
231
231
|
}, "/">;
|