@crowi/api-contract 2.0.0-alpha.13 → 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.
@@ -10387,8 +10387,6 @@ interface paths {
10387
10387
  /** Format: binary */
10388
10388
  file?: string;
10389
10389
  pageId?: string;
10390
- /** @enum {string} */
10391
- intent?: "paste" | "dnd";
10392
10390
  };
10393
10391
  };
10394
10392
  };
@@ -10456,7 +10454,7 @@ interface paths {
10456
10454
  };
10457
10455
  };
10458
10456
  };
10459
- /** @description Body exceeds the per-intent size cap */
10457
+ /** @description Body exceeds the unified upload size cap */
10460
10458
  413: {
10461
10459
  headers: {
10462
10460
  [name: string]: unknown;
@@ -10774,6 +10772,71 @@ interface paths {
10774
10772
  patch?: never;
10775
10773
  trace?: never;
10776
10774
  };
10775
+ "/attachments/upload-policy": {
10776
+ parameters: {
10777
+ query?: never;
10778
+ header?: never;
10779
+ path?: never;
10780
+ cookie?: never;
10781
+ };
10782
+ /** Get the server upload policy (allowed MIME types, extension hints, size limits) */
10783
+ get: {
10784
+ parameters: {
10785
+ query?: never;
10786
+ header?: never;
10787
+ path?: never;
10788
+ cookie?: never;
10789
+ };
10790
+ requestBody?: never;
10791
+ responses: {
10792
+ /** @description Current upload policy, derived from server-side constants (never a value maintained separately) */
10793
+ 200: {
10794
+ headers: {
10795
+ [name: string]: unknown;
10796
+ };
10797
+ content: {
10798
+ "application/json": {
10799
+ allowedMimeTypes: string[];
10800
+ extensionHints: {
10801
+ [key: string]: string;
10802
+ };
10803
+ maxBytes: {
10804
+ attachment: number;
10805
+ };
10806
+ profilePicture: {
10807
+ allowedMimeTypes: string[];
10808
+ maxBytes: number;
10809
+ };
10810
+ };
10811
+ };
10812
+ };
10813
+ /** @description Authentication required */
10814
+ 401: {
10815
+ headers: {
10816
+ [name: string]: unknown;
10817
+ };
10818
+ content: {
10819
+ "application/json": {
10820
+ error: {
10821
+ /** @enum {string} */
10822
+ code: "AUTHENTICATION_REQUIRED";
10823
+ /** @enum {string} */
10824
+ message: "Authentication is required";
10825
+ redirectTo?: string;
10826
+ };
10827
+ };
10828
+ };
10829
+ };
10830
+ };
10831
+ };
10832
+ put?: never;
10833
+ post?: never;
10834
+ delete?: never;
10835
+ options?: never;
10836
+ head?: never;
10837
+ patch?: never;
10838
+ trace?: never;
10839
+ };
10777
10840
  "/search": {
10778
10841
  parameters: {
10779
10842
  query?: never;
@@ -12235,6 +12298,7 @@ interface paths {
12235
12298
  admin?: boolean;
12236
12299
  /** @enum {integer} */
12237
12300
  status?: 1 | 2 | 3 | 4 | 5;
12301
+ linkedProviders: string[];
12238
12302
  }[];
12239
12303
  pager: {
12240
12304
  page: number;
@@ -12680,7 +12744,7 @@ interface paths {
12680
12744
  };
12681
12745
  options?: never;
12682
12746
  head?: never;
12683
- /** Update a user's name and email */
12747
+ /** Update a user's name (email changes go through PUT /admin/users/{id}/email) */
12684
12748
  patch: {
12685
12749
  parameters: {
12686
12750
  query?: never;
@@ -12694,8 +12758,6 @@ interface paths {
12694
12758
  content: {
12695
12759
  "application/json": {
12696
12760
  name: string;
12697
- /** Format: email */
12698
- email: string;
12699
12761
  };
12700
12762
  };
12701
12763
  };
@@ -12794,21 +12856,6 @@ interface paths {
12794
12856
  };
12795
12857
  };
12796
12858
  };
12797
- /** @description Email already in use by another user */
12798
- 409: {
12799
- headers: {
12800
- [name: string]: unknown;
12801
- };
12802
- content: {
12803
- "application/json": {
12804
- error: {
12805
- /** @enum {string} */
12806
- code: "CONFLICT";
12807
- message: string;
12808
- };
12809
- };
12810
- };
12811
- };
12812
12859
  /** @description Internal server error */
12813
12860
  500: {
12814
12861
  headers: {
@@ -13784,7 +13831,7 @@ interface paths {
13784
13831
  };
13785
13832
  };
13786
13833
  };
13787
- /** @description Email already in use by another user */
13834
+ /** @description Email already in use by another user, or locked by a linked federated identity */
13788
13835
  409: {
13789
13836
  headers: {
13790
13837
  [name: string]: unknown;
@@ -13796,6 +13843,12 @@ interface paths {
13796
13843
  code: "CONFLICT";
13797
13844
  message: string;
13798
13845
  };
13846
+ } | {
13847
+ error: {
13848
+ /** @enum {string} */
13849
+ code: "EMAIL_LOCKED_BY_FEDERATED_IDENTITY";
13850
+ message: string;
13851
+ };
13799
13852
  };
13800
13853
  };
13801
13854
  };
@@ -13824,6 +13877,163 @@ interface paths {
13824
13877
  patch?: never;
13825
13878
  trace?: never;
13826
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
+ };
13827
14037
  "/admin/users/pending-count": {
13828
14038
  parameters: {
13829
14039
  query?: never;
@@ -16507,6 +16717,7 @@ interface components {
16507
16717
  admin?: boolean;
16508
16718
  /** @enum {integer} */
16509
16719
  status?: 1 | 2 | 3 | 4 | 5;
16720
+ linkedProviders: string[];
16510
16721
  }[];
16511
16722
  pager: {
16512
16723
  page: number;
@@ -16575,8 +16786,6 @@ interface components {
16575
16786
  };
16576
16787
  EditAdminUserRequest: {
16577
16788
  name: string;
16578
- /** Format: email */
16579
- email: string;
16580
16789
  };
16581
16790
  ResetPasswordResponse: {
16582
16791
  user: {
@@ -10387,8 +10387,6 @@ interface paths {
10387
10387
  /** Format: binary */
10388
10388
  file?: string;
10389
10389
  pageId?: string;
10390
- /** @enum {string} */
10391
- intent?: "paste" | "dnd";
10392
10390
  };
10393
10391
  };
10394
10392
  };
@@ -10456,7 +10454,7 @@ interface paths {
10456
10454
  };
10457
10455
  };
10458
10456
  };
10459
- /** @description Body exceeds the per-intent size cap */
10457
+ /** @description Body exceeds the unified upload size cap */
10460
10458
  413: {
10461
10459
  headers: {
10462
10460
  [name: string]: unknown;
@@ -10774,6 +10772,71 @@ interface paths {
10774
10772
  patch?: never;
10775
10773
  trace?: never;
10776
10774
  };
10775
+ "/attachments/upload-policy": {
10776
+ parameters: {
10777
+ query?: never;
10778
+ header?: never;
10779
+ path?: never;
10780
+ cookie?: never;
10781
+ };
10782
+ /** Get the server upload policy (allowed MIME types, extension hints, size limits) */
10783
+ get: {
10784
+ parameters: {
10785
+ query?: never;
10786
+ header?: never;
10787
+ path?: never;
10788
+ cookie?: never;
10789
+ };
10790
+ requestBody?: never;
10791
+ responses: {
10792
+ /** @description Current upload policy, derived from server-side constants (never a value maintained separately) */
10793
+ 200: {
10794
+ headers: {
10795
+ [name: string]: unknown;
10796
+ };
10797
+ content: {
10798
+ "application/json": {
10799
+ allowedMimeTypes: string[];
10800
+ extensionHints: {
10801
+ [key: string]: string;
10802
+ };
10803
+ maxBytes: {
10804
+ attachment: number;
10805
+ };
10806
+ profilePicture: {
10807
+ allowedMimeTypes: string[];
10808
+ maxBytes: number;
10809
+ };
10810
+ };
10811
+ };
10812
+ };
10813
+ /** @description Authentication required */
10814
+ 401: {
10815
+ headers: {
10816
+ [name: string]: unknown;
10817
+ };
10818
+ content: {
10819
+ "application/json": {
10820
+ error: {
10821
+ /** @enum {string} */
10822
+ code: "AUTHENTICATION_REQUIRED";
10823
+ /** @enum {string} */
10824
+ message: "Authentication is required";
10825
+ redirectTo?: string;
10826
+ };
10827
+ };
10828
+ };
10829
+ };
10830
+ };
10831
+ };
10832
+ put?: never;
10833
+ post?: never;
10834
+ delete?: never;
10835
+ options?: never;
10836
+ head?: never;
10837
+ patch?: never;
10838
+ trace?: never;
10839
+ };
10777
10840
  "/search": {
10778
10841
  parameters: {
10779
10842
  query?: never;
@@ -12235,6 +12298,7 @@ interface paths {
12235
12298
  admin?: boolean;
12236
12299
  /** @enum {integer} */
12237
12300
  status?: 1 | 2 | 3 | 4 | 5;
12301
+ linkedProviders: string[];
12238
12302
  }[];
12239
12303
  pager: {
12240
12304
  page: number;
@@ -12680,7 +12744,7 @@ interface paths {
12680
12744
  };
12681
12745
  options?: never;
12682
12746
  head?: never;
12683
- /** Update a user's name and email */
12747
+ /** Update a user's name (email changes go through PUT /admin/users/{id}/email) */
12684
12748
  patch: {
12685
12749
  parameters: {
12686
12750
  query?: never;
@@ -12694,8 +12758,6 @@ interface paths {
12694
12758
  content: {
12695
12759
  "application/json": {
12696
12760
  name: string;
12697
- /** Format: email */
12698
- email: string;
12699
12761
  };
12700
12762
  };
12701
12763
  };
@@ -12794,21 +12856,6 @@ interface paths {
12794
12856
  };
12795
12857
  };
12796
12858
  };
12797
- /** @description Email already in use by another user */
12798
- 409: {
12799
- headers: {
12800
- [name: string]: unknown;
12801
- };
12802
- content: {
12803
- "application/json": {
12804
- error: {
12805
- /** @enum {string} */
12806
- code: "CONFLICT";
12807
- message: string;
12808
- };
12809
- };
12810
- };
12811
- };
12812
12859
  /** @description Internal server error */
12813
12860
  500: {
12814
12861
  headers: {
@@ -13784,7 +13831,7 @@ interface paths {
13784
13831
  };
13785
13832
  };
13786
13833
  };
13787
- /** @description Email already in use by another user */
13834
+ /** @description Email already in use by another user, or locked by a linked federated identity */
13788
13835
  409: {
13789
13836
  headers: {
13790
13837
  [name: string]: unknown;
@@ -13796,6 +13843,12 @@ interface paths {
13796
13843
  code: "CONFLICT";
13797
13844
  message: string;
13798
13845
  };
13846
+ } | {
13847
+ error: {
13848
+ /** @enum {string} */
13849
+ code: "EMAIL_LOCKED_BY_FEDERATED_IDENTITY";
13850
+ message: string;
13851
+ };
13799
13852
  };
13800
13853
  };
13801
13854
  };
@@ -13824,6 +13877,163 @@ interface paths {
13824
13877
  patch?: never;
13825
13878
  trace?: never;
13826
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
+ };
13827
14037
  "/admin/users/pending-count": {
13828
14038
  parameters: {
13829
14039
  query?: never;
@@ -16507,6 +16717,7 @@ interface components {
16507
16717
  admin?: boolean;
16508
16718
  /** @enum {integer} */
16509
16719
  status?: 1 | 2 | 3 | 4 | 5;
16720
+ linkedProviders: string[];
16510
16721
  }[];
16511
16722
  pager: {
16512
16723
  page: number;
@@ -16575,8 +16786,6 @@ interface components {
16575
16786
  };
16576
16787
  EditAdminUserRequest: {
16577
16788
  name: string;
16578
- /** Format: email */
16579
- email: string;
16580
16789
  };
16581
16790
  ResetPasswordResponse: {
16582
16791
  user: {