@crowi/api-contract 2.0.0-alpha.5 → 2.0.0-alpha.7
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/generated/openapi.d.mts +307 -1
- package/dist/generated/openapi.d.ts +307 -1
- package/dist/generated/openapi.js.map +1 -1
- package/dist/index.d.mts +1479 -443
- package/dist/index.d.ts +1479 -443
- package/dist/index.js +1331 -1209
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1181 -1066
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -34,7 +34,7 @@ interface paths {
|
|
|
34
34
|
confidential: string | null;
|
|
35
35
|
version: string;
|
|
36
36
|
apiVersion: string;
|
|
37
|
-
capabilities:
|
|
37
|
+
capabilities: components["schemas"]["Capability"][];
|
|
38
38
|
canSelfRegister: boolean;
|
|
39
39
|
};
|
|
40
40
|
};
|
|
@@ -3763,6 +3763,22 @@ interface paths {
|
|
|
3763
3763
|
};
|
|
3764
3764
|
};
|
|
3765
3765
|
};
|
|
3766
|
+
/** @description Page not found or not granted */
|
|
3767
|
+
404: {
|
|
3768
|
+
headers: {
|
|
3769
|
+
[name: string]: unknown;
|
|
3770
|
+
};
|
|
3771
|
+
content: {
|
|
3772
|
+
"application/json": {
|
|
3773
|
+
error: {
|
|
3774
|
+
/** @enum {string} */
|
|
3775
|
+
code: "PAGE_NOT_FOUND";
|
|
3776
|
+
/** @enum {string} */
|
|
3777
|
+
message: "Page not found";
|
|
3778
|
+
};
|
|
3779
|
+
};
|
|
3780
|
+
};
|
|
3781
|
+
};
|
|
3766
3782
|
};
|
|
3767
3783
|
};
|
|
3768
3784
|
put?: never;
|
|
@@ -3854,6 +3870,22 @@ interface paths {
|
|
|
3854
3870
|
};
|
|
3855
3871
|
};
|
|
3856
3872
|
};
|
|
3873
|
+
/** @description Page / revision not found, or the caller cannot access it (existence hidden) */
|
|
3874
|
+
404: {
|
|
3875
|
+
headers: {
|
|
3876
|
+
[name: string]: unknown;
|
|
3877
|
+
};
|
|
3878
|
+
content: {
|
|
3879
|
+
"application/json": {
|
|
3880
|
+
error: {
|
|
3881
|
+
/** @enum {string} */
|
|
3882
|
+
code: "PAGE_NOT_FOUND";
|
|
3883
|
+
/** @enum {string} */
|
|
3884
|
+
message: "Page not found";
|
|
3885
|
+
};
|
|
3886
|
+
};
|
|
3887
|
+
};
|
|
3888
|
+
};
|
|
3857
3889
|
};
|
|
3858
3890
|
};
|
|
3859
3891
|
put?: never;
|
|
@@ -4670,6 +4702,22 @@ interface paths {
|
|
|
4670
4702
|
};
|
|
4671
4703
|
};
|
|
4672
4704
|
};
|
|
4705
|
+
/** @description Internal server error */
|
|
4706
|
+
500: {
|
|
4707
|
+
headers: {
|
|
4708
|
+
[name: string]: unknown;
|
|
4709
|
+
};
|
|
4710
|
+
content: {
|
|
4711
|
+
"application/json": {
|
|
4712
|
+
error: {
|
|
4713
|
+
/** @enum {string} */
|
|
4714
|
+
code: "INTERNAL_ERROR";
|
|
4715
|
+
/** @enum {string} */
|
|
4716
|
+
message: "Internal server error";
|
|
4717
|
+
};
|
|
4718
|
+
};
|
|
4719
|
+
};
|
|
4720
|
+
};
|
|
4673
4721
|
};
|
|
4674
4722
|
};
|
|
4675
4723
|
/** Update existing page */
|
|
@@ -6472,6 +6520,241 @@ interface paths {
|
|
|
6472
6520
|
patch?: never;
|
|
6473
6521
|
trace?: never;
|
|
6474
6522
|
};
|
|
6523
|
+
"/pages/link-access": {
|
|
6524
|
+
parameters: {
|
|
6525
|
+
query?: never;
|
|
6526
|
+
header?: never;
|
|
6527
|
+
path?: never;
|
|
6528
|
+
cookie?: never;
|
|
6529
|
+
};
|
|
6530
|
+
get?: never;
|
|
6531
|
+
put?: never;
|
|
6532
|
+
/** Resolve a page by id, granting first-time link-share access to GRANT_RESTRICTED pages */
|
|
6533
|
+
post: {
|
|
6534
|
+
parameters: {
|
|
6535
|
+
query?: never;
|
|
6536
|
+
header?: never;
|
|
6537
|
+
path?: never;
|
|
6538
|
+
cookie?: never;
|
|
6539
|
+
};
|
|
6540
|
+
requestBody?: {
|
|
6541
|
+
content: {
|
|
6542
|
+
"application/json": {
|
|
6543
|
+
page_id: string;
|
|
6544
|
+
};
|
|
6545
|
+
};
|
|
6546
|
+
};
|
|
6547
|
+
responses: {
|
|
6548
|
+
/** @description The resolved page, with `granted` telling whether this call just added the caller to grantedUsers */
|
|
6549
|
+
200: {
|
|
6550
|
+
headers: {
|
|
6551
|
+
[name: string]: unknown;
|
|
6552
|
+
};
|
|
6553
|
+
content: {
|
|
6554
|
+
"application/json": {
|
|
6555
|
+
page: {
|
|
6556
|
+
_id: string;
|
|
6557
|
+
path: string;
|
|
6558
|
+
revision: {
|
|
6559
|
+
_id: string;
|
|
6560
|
+
path: string;
|
|
6561
|
+
body: string;
|
|
6562
|
+
/** @default markdown */
|
|
6563
|
+
format: string;
|
|
6564
|
+
author?: {
|
|
6565
|
+
_id: string;
|
|
6566
|
+
id?: string;
|
|
6567
|
+
username: string;
|
|
6568
|
+
name: string;
|
|
6569
|
+
/** Format: email */
|
|
6570
|
+
email: string;
|
|
6571
|
+
image?: string | null;
|
|
6572
|
+
createdAt: string;
|
|
6573
|
+
} | null;
|
|
6574
|
+
createdAt: string;
|
|
6575
|
+
meta?: {
|
|
6576
|
+
toc?: {
|
|
6577
|
+
level: number;
|
|
6578
|
+
text: string;
|
|
6579
|
+
anchorId: string;
|
|
6580
|
+
}[];
|
|
6581
|
+
wikiLinks?: {
|
|
6582
|
+
raw: string;
|
|
6583
|
+
target: string;
|
|
6584
|
+
displayText?: string;
|
|
6585
|
+
}[];
|
|
6586
|
+
mentions?: {
|
|
6587
|
+
username: string;
|
|
6588
|
+
}[];
|
|
6589
|
+
codeBlockLanguages?: string[];
|
|
6590
|
+
};
|
|
6591
|
+
renderedAst?: unknown;
|
|
6592
|
+
rendererVersion?: string;
|
|
6593
|
+
parentRevisionId?: string | null;
|
|
6594
|
+
/** @enum {string} */
|
|
6595
|
+
type?: "snapshot" | "incremental";
|
|
6596
|
+
savedBy?: string | {
|
|
6597
|
+
_id: string;
|
|
6598
|
+
id?: string;
|
|
6599
|
+
username: string;
|
|
6600
|
+
name: string;
|
|
6601
|
+
/** Format: email */
|
|
6602
|
+
email: string;
|
|
6603
|
+
image?: string | null;
|
|
6604
|
+
createdAt: string;
|
|
6605
|
+
} | null;
|
|
6606
|
+
contributors?: (string | {
|
|
6607
|
+
_id: string;
|
|
6608
|
+
id?: string;
|
|
6609
|
+
username: string;
|
|
6610
|
+
name: string;
|
|
6611
|
+
/** Format: email */
|
|
6612
|
+
email: string;
|
|
6613
|
+
image?: string | null;
|
|
6614
|
+
createdAt: string;
|
|
6615
|
+
})[];
|
|
6616
|
+
message?: string;
|
|
6617
|
+
/** @enum {string} */
|
|
6618
|
+
editVia?: "web" | "oauth" | "pat";
|
|
6619
|
+
};
|
|
6620
|
+
redirectTo?: string | null;
|
|
6621
|
+
/** @enum {string|null} */
|
|
6622
|
+
status?: "wip" | "published" | "deleted" | "deprecated" | "draft" | null;
|
|
6623
|
+
grant?: number;
|
|
6624
|
+
grantedUsers?: string[];
|
|
6625
|
+
creator?: {
|
|
6626
|
+
_id: string;
|
|
6627
|
+
id?: string;
|
|
6628
|
+
username: string;
|
|
6629
|
+
name: string;
|
|
6630
|
+
/** Format: email */
|
|
6631
|
+
email: string;
|
|
6632
|
+
image?: string | null;
|
|
6633
|
+
createdAt: string;
|
|
6634
|
+
} | null;
|
|
6635
|
+
lastUpdateUser?: {
|
|
6636
|
+
_id: string;
|
|
6637
|
+
id?: string;
|
|
6638
|
+
username: string;
|
|
6639
|
+
name: string;
|
|
6640
|
+
/** Format: email */
|
|
6641
|
+
email: string;
|
|
6642
|
+
image?: string | null;
|
|
6643
|
+
createdAt: string;
|
|
6644
|
+
} | null;
|
|
6645
|
+
liker?: string[];
|
|
6646
|
+
/** @default 0 */
|
|
6647
|
+
commentCount: number;
|
|
6648
|
+
extended?: {
|
|
6649
|
+
[key: string]: unknown;
|
|
6650
|
+
};
|
|
6651
|
+
createdAt: string;
|
|
6652
|
+
updatedAt?: string;
|
|
6653
|
+
currentRevision?: string | null;
|
|
6654
|
+
yjsCheckpointAt?: string | null;
|
|
6655
|
+
latestRevision?: string;
|
|
6656
|
+
likerCount?: number;
|
|
6657
|
+
seenUsersCount?: number;
|
|
6658
|
+
};
|
|
6659
|
+
granted: boolean;
|
|
6660
|
+
};
|
|
6661
|
+
};
|
|
6662
|
+
};
|
|
6663
|
+
/** @description Invalid page_id */
|
|
6664
|
+
400: {
|
|
6665
|
+
headers: {
|
|
6666
|
+
[name: string]: unknown;
|
|
6667
|
+
};
|
|
6668
|
+
content: {
|
|
6669
|
+
"application/json": {
|
|
6670
|
+
error: {
|
|
6671
|
+
/** @enum {string} */
|
|
6672
|
+
code: "INVALID_PAGE_ID";
|
|
6673
|
+
message: string;
|
|
6674
|
+
};
|
|
6675
|
+
};
|
|
6676
|
+
};
|
|
6677
|
+
};
|
|
6678
|
+
/** @description Authentication required */
|
|
6679
|
+
401: {
|
|
6680
|
+
headers: {
|
|
6681
|
+
[name: string]: unknown;
|
|
6682
|
+
};
|
|
6683
|
+
content: {
|
|
6684
|
+
"application/json": {
|
|
6685
|
+
error: {
|
|
6686
|
+
/** @enum {string} */
|
|
6687
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
6688
|
+
/** @enum {string} */
|
|
6689
|
+
message: "Authentication is required";
|
|
6690
|
+
redirectTo?: string;
|
|
6691
|
+
};
|
|
6692
|
+
};
|
|
6693
|
+
};
|
|
6694
|
+
};
|
|
6695
|
+
/** @description The caller has no access to the page (isGrantedFor is false) or lacks scope / is a non-web session — 403 is about the caller lacking access, never about the page grant type per se */
|
|
6696
|
+
403: {
|
|
6697
|
+
headers: {
|
|
6698
|
+
[name: string]: unknown;
|
|
6699
|
+
};
|
|
6700
|
+
content: {
|
|
6701
|
+
"application/json": {
|
|
6702
|
+
error: {
|
|
6703
|
+
/** @enum {string} */
|
|
6704
|
+
code: "PAGE_NOT_GRANTED";
|
|
6705
|
+
/** @enum {string} */
|
|
6706
|
+
message: "Page is not granted for the user";
|
|
6707
|
+
};
|
|
6708
|
+
} | {
|
|
6709
|
+
error: {
|
|
6710
|
+
/** @enum {string} */
|
|
6711
|
+
code: "INSUFFICIENT_SCOPE";
|
|
6712
|
+
message: string;
|
|
6713
|
+
details?: {
|
|
6714
|
+
requiredScope: string;
|
|
6715
|
+
};
|
|
6716
|
+
};
|
|
6717
|
+
};
|
|
6718
|
+
};
|
|
6719
|
+
};
|
|
6720
|
+
/** @description Page not found */
|
|
6721
|
+
404: {
|
|
6722
|
+
headers: {
|
|
6723
|
+
[name: string]: unknown;
|
|
6724
|
+
};
|
|
6725
|
+
content: {
|
|
6726
|
+
"application/json": {
|
|
6727
|
+
error: {
|
|
6728
|
+
/** @enum {string} */
|
|
6729
|
+
code: "PAGE_NOT_FOUND";
|
|
6730
|
+
/** @enum {string} */
|
|
6731
|
+
message: "Page not found";
|
|
6732
|
+
};
|
|
6733
|
+
};
|
|
6734
|
+
};
|
|
6735
|
+
};
|
|
6736
|
+
/** @description Rate limit exceeded for POST /pages/link-access (per-user). Same wire shape as autocomplete rate limiting. */
|
|
6737
|
+
429: {
|
|
6738
|
+
headers: {
|
|
6739
|
+
[name: string]: unknown;
|
|
6740
|
+
};
|
|
6741
|
+
content: {
|
|
6742
|
+
"application/json": {
|
|
6743
|
+
/** @enum {string} */
|
|
6744
|
+
error: "rate_limited";
|
|
6745
|
+
message: string;
|
|
6746
|
+
retryAfterSeconds: number;
|
|
6747
|
+
};
|
|
6748
|
+
};
|
|
6749
|
+
};
|
|
6750
|
+
};
|
|
6751
|
+
};
|
|
6752
|
+
delete?: never;
|
|
6753
|
+
options?: never;
|
|
6754
|
+
head?: never;
|
|
6755
|
+
patch?: never;
|
|
6756
|
+
trace?: never;
|
|
6757
|
+
};
|
|
6475
6758
|
"/pages/watch": {
|
|
6476
6759
|
parameters: {
|
|
6477
6760
|
query?: never;
|
|
@@ -12160,6 +12443,7 @@ interface paths {
|
|
|
12160
12443
|
name: string;
|
|
12161
12444
|
version: string;
|
|
12162
12445
|
requires?: string[];
|
|
12446
|
+
modelAccess?: string[];
|
|
12163
12447
|
hasConfig: boolean;
|
|
12164
12448
|
registers: string[];
|
|
12165
12449
|
adminPlacement: {
|
|
@@ -12169,6 +12453,12 @@ interface paths {
|
|
|
12169
12453
|
icon?: string;
|
|
12170
12454
|
};
|
|
12171
12455
|
supportsHotReload: boolean;
|
|
12456
|
+
/**
|
|
12457
|
+
* @default active
|
|
12458
|
+
* @enum {string}
|
|
12459
|
+
*/
|
|
12460
|
+
status: "active" | "failed";
|
|
12461
|
+
error?: string;
|
|
12172
12462
|
}[];
|
|
12173
12463
|
};
|
|
12174
12464
|
};
|
|
@@ -14784,6 +15074,7 @@ interface components {
|
|
|
14784
15074
|
name: string;
|
|
14785
15075
|
version: string;
|
|
14786
15076
|
requires?: string[];
|
|
15077
|
+
modelAccess?: string[];
|
|
14787
15078
|
hasConfig: boolean;
|
|
14788
15079
|
registers: string[];
|
|
14789
15080
|
adminPlacement: {
|
|
@@ -14793,12 +15084,19 @@ interface components {
|
|
|
14793
15084
|
icon?: string;
|
|
14794
15085
|
};
|
|
14795
15086
|
supportsHotReload: boolean;
|
|
15087
|
+
/**
|
|
15088
|
+
* @default active
|
|
15089
|
+
* @enum {string}
|
|
15090
|
+
*/
|
|
15091
|
+
status: "active" | "failed";
|
|
15092
|
+
error?: string;
|
|
14796
15093
|
};
|
|
14797
15094
|
ListPluginsResponse: {
|
|
14798
15095
|
plugins: {
|
|
14799
15096
|
name: string;
|
|
14800
15097
|
version: string;
|
|
14801
15098
|
requires?: string[];
|
|
15099
|
+
modelAccess?: string[];
|
|
14802
15100
|
hasConfig: boolean;
|
|
14803
15101
|
registers: string[];
|
|
14804
15102
|
adminPlacement: {
|
|
@@ -14808,6 +15106,12 @@ interface components {
|
|
|
14808
15106
|
icon?: string;
|
|
14809
15107
|
};
|
|
14810
15108
|
supportsHotReload: boolean;
|
|
15109
|
+
/**
|
|
15110
|
+
* @default active
|
|
15111
|
+
* @enum {string}
|
|
15112
|
+
*/
|
|
15113
|
+
status: "active" | "failed";
|
|
15114
|
+
error?: string;
|
|
14811
15115
|
}[];
|
|
14812
15116
|
};
|
|
14813
15117
|
PluginConfigResponse: {
|
|
@@ -14860,6 +15164,8 @@ interface components {
|
|
|
14860
15164
|
}[];
|
|
14861
15165
|
};
|
|
14862
15166
|
};
|
|
15167
|
+
/** @enum {string} */
|
|
15168
|
+
Capability: "oauth" | "oauth:auth-code" | "oauth:device" | "oauth:pkce" | "pat" | "pages" | "comments" | "bookmarks" | "attachments" | "notifications" | "search" | "collab" | "collab:redis";
|
|
14863
15169
|
};
|
|
14864
15170
|
responses: never;
|
|
14865
15171
|
parameters: never;
|