@crowi/api-contract 2.0.0-alpha.14 → 2.0.0-alpha.15
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 +167 -21
- package/dist/generated/openapi.d.ts +167 -21
- package/dist/generated/openapi.js.map +1 -1
- package/dist/index.d.mts +584 -102
- package/dist/index.d.ts +584 -102
- package/dist/index.js +91 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +85 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -12298,6 +12298,7 @@ interface paths {
|
|
|
12298
12298
|
admin?: boolean;
|
|
12299
12299
|
/** @enum {integer} */
|
|
12300
12300
|
status?: 1 | 2 | 3 | 4 | 5;
|
|
12301
|
+
linkedProviders: string[];
|
|
12301
12302
|
}[];
|
|
12302
12303
|
pager: {
|
|
12303
12304
|
page: number;
|
|
@@ -12743,7 +12744,7 @@ interface paths {
|
|
|
12743
12744
|
};
|
|
12744
12745
|
options?: never;
|
|
12745
12746
|
head?: never;
|
|
12746
|
-
/** Update a user's name
|
|
12747
|
+
/** Update a user's name (email changes go through PUT /admin/users/{id}/email) */
|
|
12747
12748
|
patch: {
|
|
12748
12749
|
parameters: {
|
|
12749
12750
|
query?: never;
|
|
@@ -12757,8 +12758,6 @@ interface paths {
|
|
|
12757
12758
|
content: {
|
|
12758
12759
|
"application/json": {
|
|
12759
12760
|
name: string;
|
|
12760
|
-
/** Format: email */
|
|
12761
|
-
email: string;
|
|
12762
12761
|
};
|
|
12763
12762
|
};
|
|
12764
12763
|
};
|
|
@@ -12857,21 +12856,6 @@ interface paths {
|
|
|
12857
12856
|
};
|
|
12858
12857
|
};
|
|
12859
12858
|
};
|
|
12860
|
-
/** @description Email already in use by another user */
|
|
12861
|
-
409: {
|
|
12862
|
-
headers: {
|
|
12863
|
-
[name: string]: unknown;
|
|
12864
|
-
};
|
|
12865
|
-
content: {
|
|
12866
|
-
"application/json": {
|
|
12867
|
-
error: {
|
|
12868
|
-
/** @enum {string} */
|
|
12869
|
-
code: "CONFLICT";
|
|
12870
|
-
message: string;
|
|
12871
|
-
};
|
|
12872
|
-
};
|
|
12873
|
-
};
|
|
12874
|
-
};
|
|
12875
12859
|
/** @description Internal server error */
|
|
12876
12860
|
500: {
|
|
12877
12861
|
headers: {
|
|
@@ -13847,7 +13831,7 @@ interface paths {
|
|
|
13847
13831
|
};
|
|
13848
13832
|
};
|
|
13849
13833
|
};
|
|
13850
|
-
/** @description Email already in use by another user */
|
|
13834
|
+
/** @description Email already in use by another user, or locked by a linked federated identity */
|
|
13851
13835
|
409: {
|
|
13852
13836
|
headers: {
|
|
13853
13837
|
[name: string]: unknown;
|
|
@@ -13859,6 +13843,12 @@ interface paths {
|
|
|
13859
13843
|
code: "CONFLICT";
|
|
13860
13844
|
message: string;
|
|
13861
13845
|
};
|
|
13846
|
+
} | {
|
|
13847
|
+
error: {
|
|
13848
|
+
/** @enum {string} */
|
|
13849
|
+
code: "EMAIL_LOCKED_BY_FEDERATED_IDENTITY";
|
|
13850
|
+
message: string;
|
|
13851
|
+
};
|
|
13862
13852
|
};
|
|
13863
13853
|
};
|
|
13864
13854
|
};
|
|
@@ -13887,6 +13877,163 @@ interface paths {
|
|
|
13887
13877
|
patch?: never;
|
|
13888
13878
|
trace?: never;
|
|
13889
13879
|
};
|
|
13880
|
+
"/admin/users/{id}/identities/{provider}": {
|
|
13881
|
+
parameters: {
|
|
13882
|
+
query?: never;
|
|
13883
|
+
header?: never;
|
|
13884
|
+
path?: never;
|
|
13885
|
+
cookie?: never;
|
|
13886
|
+
};
|
|
13887
|
+
get?: never;
|
|
13888
|
+
put?: never;
|
|
13889
|
+
post?: never;
|
|
13890
|
+
/** Unlink a user's federated identity for a provider (admin-initiated) */
|
|
13891
|
+
delete: {
|
|
13892
|
+
parameters: {
|
|
13893
|
+
query?: never;
|
|
13894
|
+
header?: never;
|
|
13895
|
+
path: {
|
|
13896
|
+
id: string;
|
|
13897
|
+
provider: string;
|
|
13898
|
+
};
|
|
13899
|
+
cookie?: never;
|
|
13900
|
+
};
|
|
13901
|
+
requestBody?: never;
|
|
13902
|
+
responses: {
|
|
13903
|
+
/** @description Identity removed; passwordIssued/newPassword report whether a password was generated */
|
|
13904
|
+
200: {
|
|
13905
|
+
headers: {
|
|
13906
|
+
[name: string]: unknown;
|
|
13907
|
+
};
|
|
13908
|
+
content: {
|
|
13909
|
+
"application/json": {
|
|
13910
|
+
user: {
|
|
13911
|
+
_id: string;
|
|
13912
|
+
id?: string;
|
|
13913
|
+
username: string;
|
|
13914
|
+
name: string;
|
|
13915
|
+
/** Format: email */
|
|
13916
|
+
email: string;
|
|
13917
|
+
image?: string | null;
|
|
13918
|
+
introduction?: string;
|
|
13919
|
+
createdAt: string;
|
|
13920
|
+
admin?: boolean;
|
|
13921
|
+
/** @enum {integer} */
|
|
13922
|
+
status?: 1 | 2 | 3 | 4 | 5;
|
|
13923
|
+
};
|
|
13924
|
+
passwordIssued: boolean;
|
|
13925
|
+
newPassword?: string;
|
|
13926
|
+
};
|
|
13927
|
+
};
|
|
13928
|
+
};
|
|
13929
|
+
/** @description Invalid id */
|
|
13930
|
+
400: {
|
|
13931
|
+
headers: {
|
|
13932
|
+
[name: string]: unknown;
|
|
13933
|
+
};
|
|
13934
|
+
content: {
|
|
13935
|
+
"application/json": {
|
|
13936
|
+
error: {
|
|
13937
|
+
/** @enum {string} */
|
|
13938
|
+
code: "VALIDATION_ERROR";
|
|
13939
|
+
message: string;
|
|
13940
|
+
details?: {
|
|
13941
|
+
fieldErrors: {
|
|
13942
|
+
[key: string]: string[];
|
|
13943
|
+
};
|
|
13944
|
+
formErrors: string[];
|
|
13945
|
+
};
|
|
13946
|
+
};
|
|
13947
|
+
};
|
|
13948
|
+
};
|
|
13949
|
+
};
|
|
13950
|
+
/** @description Authentication required */
|
|
13951
|
+
401: {
|
|
13952
|
+
headers: {
|
|
13953
|
+
[name: string]: unknown;
|
|
13954
|
+
};
|
|
13955
|
+
content: {
|
|
13956
|
+
"application/json": {
|
|
13957
|
+
error: {
|
|
13958
|
+
/** @enum {string} */
|
|
13959
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
13960
|
+
/** @enum {string} */
|
|
13961
|
+
message: "Authentication is required";
|
|
13962
|
+
redirectTo?: string;
|
|
13963
|
+
};
|
|
13964
|
+
};
|
|
13965
|
+
};
|
|
13966
|
+
};
|
|
13967
|
+
/** @description Admin permission required */
|
|
13968
|
+
403: {
|
|
13969
|
+
headers: {
|
|
13970
|
+
[name: string]: unknown;
|
|
13971
|
+
};
|
|
13972
|
+
content: {
|
|
13973
|
+
"application/json": {
|
|
13974
|
+
error: {
|
|
13975
|
+
/** @enum {string} */
|
|
13976
|
+
code: "ADMIN_REQUIRED";
|
|
13977
|
+
/** @enum {string} */
|
|
13978
|
+
message: "Admin permission required";
|
|
13979
|
+
redirectTo?: string;
|
|
13980
|
+
};
|
|
13981
|
+
};
|
|
13982
|
+
};
|
|
13983
|
+
};
|
|
13984
|
+
/** @description User not found, or the user has no identity for this provider */
|
|
13985
|
+
404: {
|
|
13986
|
+
headers: {
|
|
13987
|
+
[name: string]: unknown;
|
|
13988
|
+
};
|
|
13989
|
+
content: {
|
|
13990
|
+
"application/json": {
|
|
13991
|
+
error: {
|
|
13992
|
+
/** @enum {string} */
|
|
13993
|
+
code: "NOT_FOUND" | "NOT_LINKED";
|
|
13994
|
+
message: string;
|
|
13995
|
+
};
|
|
13996
|
+
};
|
|
13997
|
+
};
|
|
13998
|
+
};
|
|
13999
|
+
/** @description Refused: the target is the operating admin themself, or password auth is disabled instance-wide */
|
|
14000
|
+
409: {
|
|
14001
|
+
headers: {
|
|
14002
|
+
[name: string]: unknown;
|
|
14003
|
+
};
|
|
14004
|
+
content: {
|
|
14005
|
+
"application/json": {
|
|
14006
|
+
error: {
|
|
14007
|
+
/** @enum {string} */
|
|
14008
|
+
code: "CANNOT_UNLINK_SELF" | "PASSWORD_AUTH_DISABLED";
|
|
14009
|
+
message: string;
|
|
14010
|
+
};
|
|
14011
|
+
};
|
|
14012
|
+
};
|
|
14013
|
+
};
|
|
14014
|
+
/** @description Internal server error */
|
|
14015
|
+
500: {
|
|
14016
|
+
headers: {
|
|
14017
|
+
[name: string]: unknown;
|
|
14018
|
+
};
|
|
14019
|
+
content: {
|
|
14020
|
+
"application/json": {
|
|
14021
|
+
error: {
|
|
14022
|
+
/** @enum {string} */
|
|
14023
|
+
code: "INTERNAL_ERROR";
|
|
14024
|
+
/** @enum {string} */
|
|
14025
|
+
message: "Internal server error";
|
|
14026
|
+
};
|
|
14027
|
+
};
|
|
14028
|
+
};
|
|
14029
|
+
};
|
|
14030
|
+
};
|
|
14031
|
+
};
|
|
14032
|
+
options?: never;
|
|
14033
|
+
head?: never;
|
|
14034
|
+
patch?: never;
|
|
14035
|
+
trace?: never;
|
|
14036
|
+
};
|
|
13890
14037
|
"/admin/users/pending-count": {
|
|
13891
14038
|
parameters: {
|
|
13892
14039
|
query?: never;
|
|
@@ -16570,6 +16717,7 @@ interface components {
|
|
|
16570
16717
|
admin?: boolean;
|
|
16571
16718
|
/** @enum {integer} */
|
|
16572
16719
|
status?: 1 | 2 | 3 | 4 | 5;
|
|
16720
|
+
linkedProviders: string[];
|
|
16573
16721
|
}[];
|
|
16574
16722
|
pager: {
|
|
16575
16723
|
page: number;
|
|
@@ -16638,8 +16786,6 @@ interface components {
|
|
|
16638
16786
|
};
|
|
16639
16787
|
EditAdminUserRequest: {
|
|
16640
16788
|
name: string;
|
|
16641
|
-
/** Format: email */
|
|
16642
|
-
email: string;
|
|
16643
16789
|
};
|
|
16644
16790
|
ResetPasswordResponse: {
|
|
16645
16791
|
user: {
|
|
@@ -12298,6 +12298,7 @@ interface paths {
|
|
|
12298
12298
|
admin?: boolean;
|
|
12299
12299
|
/** @enum {integer} */
|
|
12300
12300
|
status?: 1 | 2 | 3 | 4 | 5;
|
|
12301
|
+
linkedProviders: string[];
|
|
12301
12302
|
}[];
|
|
12302
12303
|
pager: {
|
|
12303
12304
|
page: number;
|
|
@@ -12743,7 +12744,7 @@ interface paths {
|
|
|
12743
12744
|
};
|
|
12744
12745
|
options?: never;
|
|
12745
12746
|
head?: never;
|
|
12746
|
-
/** Update a user's name
|
|
12747
|
+
/** Update a user's name (email changes go through PUT /admin/users/{id}/email) */
|
|
12747
12748
|
patch: {
|
|
12748
12749
|
parameters: {
|
|
12749
12750
|
query?: never;
|
|
@@ -12757,8 +12758,6 @@ interface paths {
|
|
|
12757
12758
|
content: {
|
|
12758
12759
|
"application/json": {
|
|
12759
12760
|
name: string;
|
|
12760
|
-
/** Format: email */
|
|
12761
|
-
email: string;
|
|
12762
12761
|
};
|
|
12763
12762
|
};
|
|
12764
12763
|
};
|
|
@@ -12857,21 +12856,6 @@ interface paths {
|
|
|
12857
12856
|
};
|
|
12858
12857
|
};
|
|
12859
12858
|
};
|
|
12860
|
-
/** @description Email already in use by another user */
|
|
12861
|
-
409: {
|
|
12862
|
-
headers: {
|
|
12863
|
-
[name: string]: unknown;
|
|
12864
|
-
};
|
|
12865
|
-
content: {
|
|
12866
|
-
"application/json": {
|
|
12867
|
-
error: {
|
|
12868
|
-
/** @enum {string} */
|
|
12869
|
-
code: "CONFLICT";
|
|
12870
|
-
message: string;
|
|
12871
|
-
};
|
|
12872
|
-
};
|
|
12873
|
-
};
|
|
12874
|
-
};
|
|
12875
12859
|
/** @description Internal server error */
|
|
12876
12860
|
500: {
|
|
12877
12861
|
headers: {
|
|
@@ -13847,7 +13831,7 @@ interface paths {
|
|
|
13847
13831
|
};
|
|
13848
13832
|
};
|
|
13849
13833
|
};
|
|
13850
|
-
/** @description Email already in use by another user */
|
|
13834
|
+
/** @description Email already in use by another user, or locked by a linked federated identity */
|
|
13851
13835
|
409: {
|
|
13852
13836
|
headers: {
|
|
13853
13837
|
[name: string]: unknown;
|
|
@@ -13859,6 +13843,12 @@ interface paths {
|
|
|
13859
13843
|
code: "CONFLICT";
|
|
13860
13844
|
message: string;
|
|
13861
13845
|
};
|
|
13846
|
+
} | {
|
|
13847
|
+
error: {
|
|
13848
|
+
/** @enum {string} */
|
|
13849
|
+
code: "EMAIL_LOCKED_BY_FEDERATED_IDENTITY";
|
|
13850
|
+
message: string;
|
|
13851
|
+
};
|
|
13862
13852
|
};
|
|
13863
13853
|
};
|
|
13864
13854
|
};
|
|
@@ -13887,6 +13877,163 @@ interface paths {
|
|
|
13887
13877
|
patch?: never;
|
|
13888
13878
|
trace?: never;
|
|
13889
13879
|
};
|
|
13880
|
+
"/admin/users/{id}/identities/{provider}": {
|
|
13881
|
+
parameters: {
|
|
13882
|
+
query?: never;
|
|
13883
|
+
header?: never;
|
|
13884
|
+
path?: never;
|
|
13885
|
+
cookie?: never;
|
|
13886
|
+
};
|
|
13887
|
+
get?: never;
|
|
13888
|
+
put?: never;
|
|
13889
|
+
post?: never;
|
|
13890
|
+
/** Unlink a user's federated identity for a provider (admin-initiated) */
|
|
13891
|
+
delete: {
|
|
13892
|
+
parameters: {
|
|
13893
|
+
query?: never;
|
|
13894
|
+
header?: never;
|
|
13895
|
+
path: {
|
|
13896
|
+
id: string;
|
|
13897
|
+
provider: string;
|
|
13898
|
+
};
|
|
13899
|
+
cookie?: never;
|
|
13900
|
+
};
|
|
13901
|
+
requestBody?: never;
|
|
13902
|
+
responses: {
|
|
13903
|
+
/** @description Identity removed; passwordIssued/newPassword report whether a password was generated */
|
|
13904
|
+
200: {
|
|
13905
|
+
headers: {
|
|
13906
|
+
[name: string]: unknown;
|
|
13907
|
+
};
|
|
13908
|
+
content: {
|
|
13909
|
+
"application/json": {
|
|
13910
|
+
user: {
|
|
13911
|
+
_id: string;
|
|
13912
|
+
id?: string;
|
|
13913
|
+
username: string;
|
|
13914
|
+
name: string;
|
|
13915
|
+
/** Format: email */
|
|
13916
|
+
email: string;
|
|
13917
|
+
image?: string | null;
|
|
13918
|
+
introduction?: string;
|
|
13919
|
+
createdAt: string;
|
|
13920
|
+
admin?: boolean;
|
|
13921
|
+
/** @enum {integer} */
|
|
13922
|
+
status?: 1 | 2 | 3 | 4 | 5;
|
|
13923
|
+
};
|
|
13924
|
+
passwordIssued: boolean;
|
|
13925
|
+
newPassword?: string;
|
|
13926
|
+
};
|
|
13927
|
+
};
|
|
13928
|
+
};
|
|
13929
|
+
/** @description Invalid id */
|
|
13930
|
+
400: {
|
|
13931
|
+
headers: {
|
|
13932
|
+
[name: string]: unknown;
|
|
13933
|
+
};
|
|
13934
|
+
content: {
|
|
13935
|
+
"application/json": {
|
|
13936
|
+
error: {
|
|
13937
|
+
/** @enum {string} */
|
|
13938
|
+
code: "VALIDATION_ERROR";
|
|
13939
|
+
message: string;
|
|
13940
|
+
details?: {
|
|
13941
|
+
fieldErrors: {
|
|
13942
|
+
[key: string]: string[];
|
|
13943
|
+
};
|
|
13944
|
+
formErrors: string[];
|
|
13945
|
+
};
|
|
13946
|
+
};
|
|
13947
|
+
};
|
|
13948
|
+
};
|
|
13949
|
+
};
|
|
13950
|
+
/** @description Authentication required */
|
|
13951
|
+
401: {
|
|
13952
|
+
headers: {
|
|
13953
|
+
[name: string]: unknown;
|
|
13954
|
+
};
|
|
13955
|
+
content: {
|
|
13956
|
+
"application/json": {
|
|
13957
|
+
error: {
|
|
13958
|
+
/** @enum {string} */
|
|
13959
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
13960
|
+
/** @enum {string} */
|
|
13961
|
+
message: "Authentication is required";
|
|
13962
|
+
redirectTo?: string;
|
|
13963
|
+
};
|
|
13964
|
+
};
|
|
13965
|
+
};
|
|
13966
|
+
};
|
|
13967
|
+
/** @description Admin permission required */
|
|
13968
|
+
403: {
|
|
13969
|
+
headers: {
|
|
13970
|
+
[name: string]: unknown;
|
|
13971
|
+
};
|
|
13972
|
+
content: {
|
|
13973
|
+
"application/json": {
|
|
13974
|
+
error: {
|
|
13975
|
+
/** @enum {string} */
|
|
13976
|
+
code: "ADMIN_REQUIRED";
|
|
13977
|
+
/** @enum {string} */
|
|
13978
|
+
message: "Admin permission required";
|
|
13979
|
+
redirectTo?: string;
|
|
13980
|
+
};
|
|
13981
|
+
};
|
|
13982
|
+
};
|
|
13983
|
+
};
|
|
13984
|
+
/** @description User not found, or the user has no identity for this provider */
|
|
13985
|
+
404: {
|
|
13986
|
+
headers: {
|
|
13987
|
+
[name: string]: unknown;
|
|
13988
|
+
};
|
|
13989
|
+
content: {
|
|
13990
|
+
"application/json": {
|
|
13991
|
+
error: {
|
|
13992
|
+
/** @enum {string} */
|
|
13993
|
+
code: "NOT_FOUND" | "NOT_LINKED";
|
|
13994
|
+
message: string;
|
|
13995
|
+
};
|
|
13996
|
+
};
|
|
13997
|
+
};
|
|
13998
|
+
};
|
|
13999
|
+
/** @description Refused: the target is the operating admin themself, or password auth is disabled instance-wide */
|
|
14000
|
+
409: {
|
|
14001
|
+
headers: {
|
|
14002
|
+
[name: string]: unknown;
|
|
14003
|
+
};
|
|
14004
|
+
content: {
|
|
14005
|
+
"application/json": {
|
|
14006
|
+
error: {
|
|
14007
|
+
/** @enum {string} */
|
|
14008
|
+
code: "CANNOT_UNLINK_SELF" | "PASSWORD_AUTH_DISABLED";
|
|
14009
|
+
message: string;
|
|
14010
|
+
};
|
|
14011
|
+
};
|
|
14012
|
+
};
|
|
14013
|
+
};
|
|
14014
|
+
/** @description Internal server error */
|
|
14015
|
+
500: {
|
|
14016
|
+
headers: {
|
|
14017
|
+
[name: string]: unknown;
|
|
14018
|
+
};
|
|
14019
|
+
content: {
|
|
14020
|
+
"application/json": {
|
|
14021
|
+
error: {
|
|
14022
|
+
/** @enum {string} */
|
|
14023
|
+
code: "INTERNAL_ERROR";
|
|
14024
|
+
/** @enum {string} */
|
|
14025
|
+
message: "Internal server error";
|
|
14026
|
+
};
|
|
14027
|
+
};
|
|
14028
|
+
};
|
|
14029
|
+
};
|
|
14030
|
+
};
|
|
14031
|
+
};
|
|
14032
|
+
options?: never;
|
|
14033
|
+
head?: never;
|
|
14034
|
+
patch?: never;
|
|
14035
|
+
trace?: never;
|
|
14036
|
+
};
|
|
13890
14037
|
"/admin/users/pending-count": {
|
|
13891
14038
|
parameters: {
|
|
13892
14039
|
query?: never;
|
|
@@ -16570,6 +16717,7 @@ interface components {
|
|
|
16570
16717
|
admin?: boolean;
|
|
16571
16718
|
/** @enum {integer} */
|
|
16572
16719
|
status?: 1 | 2 | 3 | 4 | 5;
|
|
16720
|
+
linkedProviders: string[];
|
|
16573
16721
|
}[];
|
|
16574
16722
|
pager: {
|
|
16575
16723
|
page: number;
|
|
@@ -16638,8 +16786,6 @@ interface components {
|
|
|
16638
16786
|
};
|
|
16639
16787
|
EditAdminUserRequest: {
|
|
16640
16788
|
name: string;
|
|
16641
|
-
/** Format: email */
|
|
16642
|
-
email: string;
|
|
16643
16789
|
};
|
|
16644
16790
|
ResetPasswordResponse: {
|
|
16645
16791
|
user: {
|