@crowi/api-contract 2.0.0-alpha.14 → 2.0.0-alpha.16

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/index.js CHANGED
@@ -43,6 +43,8 @@ __export(index_exports, {
43
43
  AdminRequiredErrorSchema: () => AdminRequiredErrorSchema,
44
44
  AdminSidebarSection: () => AdminSidebarSection,
45
45
  AdminUserIdParamSchema: () => AdminUserIdParamSchema,
46
+ AdminUserIdentityParamSchema: () => AdminUserIdentityParamSchema,
47
+ AdminUserListItemSchema: () => AdminUserListItemSchema,
46
48
  AdminUserMutationResponseSchema: () => AdminUserMutationResponseSchema,
47
49
  ApiErrorSchema: () => ApiErrorSchema,
48
50
  AppInfoResponseSchema: () => AppInfoResponseSchema,
@@ -78,6 +80,8 @@ __export(index_exports, {
78
80
  CommentInvalidRequestErrorSchema: () => CommentInvalidRequestErrorSchema,
79
81
  CommentNotFoundErrorSchema: () => CommentNotFoundErrorSchema,
80
82
  CommentSchema: () => CommentSchema,
83
+ CompleteProviderLinkConflictErrorSchema: () => CompleteProviderLinkConflictErrorSchema,
84
+ CompleteProviderLinkResponseSchema: () => CompleteProviderLinkResponseSchema,
81
85
  ConfigReadinessIssueSchema: () => ConfigReadinessIssueSchema,
82
86
  ConfigReadinessResponseSchema: () => ConfigReadinessResponseSchema,
83
87
  ConfirmEmailChangeRequestSchema: () => ConfirmEmailChangeRequestSchema,
@@ -90,8 +94,6 @@ __export(index_exports, {
90
94
  CreateAdminResponseSchema: () => CreateAdminResponseSchema,
91
95
  CreateDraftRequestSchema: () => CreateDraftRequestSchema,
92
96
  CreateDraftResponseSchema: () => CreateDraftResponseSchema,
93
- CreateLinkGrantRequestSchema: () => CreateLinkGrantRequestSchema,
94
- CreateLinkGrantResponseSchema: () => CreateLinkGrantResponseSchema,
95
97
  CreatePageRequestSchema: () => CreatePageRequestSchema,
96
98
  CrowiCodeSidecarSchema: () => CrowiCodeSidecarSchema,
97
99
  CrowiDiagramNodeSchema: () => CrowiDiagramNodeSchema,
@@ -126,6 +128,7 @@ __export(index_exports, {
126
128
  DraftSummarySchema: () => DraftSummarySchema,
127
129
  ERROR_CODES: () => ERROR_CODES,
128
130
  EditAdminUserRequestSchema: () => EditAdminUserRequestSchema,
131
+ EmailLockedByFederatedIdentityErrorSchema: () => EmailLockedByFederatedIdentityErrorSchema,
129
132
  EncryptionNotConfiguredErrorSchema: () => EncryptionNotConfiguredErrorSchema,
130
133
  ErrorCodeSchema: () => ErrorCodeSchema,
131
134
  FRONTMATTER_MAX_ENTRIES: () => FRONTMATTER_MAX_ENTRIES,
@@ -181,6 +184,8 @@ __export(index_exports, {
181
184
  LanguageSchema: () => LanguageSchema,
182
185
  LikerSchema: () => LikerSchema,
183
186
  LikersResponseSchema: () => LikersResponseSchema,
187
+ LinkCompletionCodeSchema: () => LinkCompletionCodeSchema,
188
+ LinkCompletionConsumedErrorSchema: () => LinkCompletionConsumedErrorSchema,
184
189
  LinkedAuthProviderListResponseSchema: () => LinkedAuthProviderListResponseSchema,
185
190
  ListAccessTokensResponseSchema: () => ListAccessTokensResponseSchema,
186
191
  ListAdminUsersRequestSchema: () => ListAdminUsersRequestSchema,
@@ -245,6 +250,7 @@ __export(index_exports, {
245
250
  PasswordErrorResponseSchema: () => PasswordErrorResponseSchema,
246
251
  PasswordUpdateSuccessSchema: () => PasswordUpdateSuccessSchema,
247
252
  PastAttachmentUsageSchema: () => PastAttachmentUsageSchema,
253
+ PendingLinkCompletionResponseSchema: () => PendingLinkCompletionResponseSchema,
248
254
  PendingUsersCountResponseSchema: () => PendingUsersCountResponseSchema,
249
255
  PictureUploadResponseSchema: () => PictureUploadResponseSchema,
250
256
  PluginAdminPlacementSchema: () => PluginAdminPlacementSchema,
@@ -324,6 +330,7 @@ __export(index_exports, {
324
330
  ShikiTokenLinesSchema: () => ShikiTokenLinesSchema,
325
331
  ShikiTokenSchema: () => ShikiTokenSchema,
326
332
  ShikiTokenStyleSchema: () => ShikiTokenStyleSchema,
333
+ StartProviderLinkResponseSchema: () => StartProviderLinkResponseSchema,
327
334
  StorageDriverEntrySchema: () => StorageDriverEntrySchema,
328
335
  SuccessResponseSchema: () => SuccessResponseSchema,
329
336
  ThemeSchema: () => ThemeSchema,
@@ -338,6 +345,9 @@ __export(index_exports, {
338
345
  TokenResponseSchema: () => TokenResponseSchema,
339
346
  UPLOAD_ALLOWED_MIME: () => UPLOAD_ALLOWED_MIME,
340
347
  UnlinkAuthProviderErrorSchema: () => UnlinkAuthProviderErrorSchema,
348
+ UnlinkUserIdentityConflictErrorSchema: () => UnlinkUserIdentityConflictErrorSchema,
349
+ UnlinkUserIdentityNotFoundErrorSchema: () => UnlinkUserIdentityNotFoundErrorSchema,
350
+ UnlinkUserIdentityResponseSchema: () => UnlinkUserIdentityResponseSchema,
341
351
  UpdateAdminUserEmailRequestSchema: () => UpdateAdminUserEmailRequestSchema,
342
352
  UpdateAppSettingsRequestSchema: () => UpdateAppSettingsRequestSchema,
343
353
  UpdateAppSettingsResponseSchema: () => UpdateAppSettingsResponseSchema,
@@ -409,10 +419,10 @@ __export(index_exports, {
409
419
  clearRenderCachePluginRoute: () => clearRenderCachePluginRoute,
410
420
  clientInfoRoute: () => clientInfoRoute,
411
421
  commentRoutes: () => commentRoutes,
422
+ completeProviderLinkRoute: () => completeProviderLinkRoute,
412
423
  confirmEmailChangeRoute: () => confirmEmailChangeRoute,
413
424
  createAccessTokenRoute: () => createAccessTokenRoute,
414
425
  createAdminRoute: () => createAdminRoute,
415
- createAuthProviderLinkGrantRoute: () => createAuthProviderLinkGrantRoute,
416
426
  createClient: () => createClient,
417
427
  createDraftRoute: () => createDraftRoute,
418
428
  createPageRoute: () => createPageRoute,
@@ -450,6 +460,7 @@ __export(index_exports, {
450
460
  getPluginReadinessRoute: () => getPluginReadinessRoute,
451
461
  getPresenceTokenRoute: () => getPresenceTokenRoute,
452
462
  getProfileRoute: () => getProfileRoute,
463
+ getProviderLinkCompletionRoute: () => getProviderLinkCompletionRoute,
453
464
  getRevisionRoute: () => getRevisionRoute,
454
465
  getRevisionsRoute: () => getRevisionsRoute,
455
466
  getSearchStatusRoute: () => getSearchStatusRoute,
@@ -523,6 +534,7 @@ __export(index_exports, {
523
534
  setPageGrantRoute: () => setPageGrantRoute,
524
535
  setWatchStatusRoute: () => setWatchStatusRoute,
525
536
  startFederatedProviderRoute: () => startFederatedProviderRoute,
537
+ startProviderLinkRoute: () => startProviderLinkRoute,
526
538
  stripKnownHtmlTags: () => stripKnownHtmlTags,
527
539
  submitFederatedRegistrationRoute: () => submitFederatedRegistrationRoute,
528
540
  suspendUserRoute: () => suspendUserRoute,
@@ -535,6 +547,7 @@ __export(index_exports, {
535
547
  tokenRoute: () => tokenRoute,
536
548
  unlikePageRoute: () => unlikePageRoute,
537
549
  unlinkAuthProviderRoute: () => unlinkAuthProviderRoute,
550
+ unlinkUserIdentityRoute: () => unlinkUserIdentityRoute,
538
551
  unwrapRenderedAst: () => unwrapRenderedAst,
539
552
  updateAppSettingsRoute: () => updateAppSettingsRoute,
540
553
  updateAuthSettingsRoute: () => updateAuthSettingsRoute,
@@ -665,6 +678,11 @@ var ERROR_CODES = [
665
678
  // --- federated sign-in (RFC-0014) ---
666
679
  "FEDERATED_HANDOFF_INVALID",
667
680
  "FEDERATED_HANDOFF_CONSUMED",
681
+ // --- federated account linking (RFC-0014 §5.4) ---
682
+ "FEDERATED_IDENTITY_IN_USE",
683
+ "FEDERATED_LINK_AUTH_STATE_CHANGED",
684
+ "FEDERATED_LINK_NOT_LINKED",
685
+ "LINK_COMPLETION_CONSUMED",
668
686
  // --- admin subsystems ---
669
687
  "ENCRYPTION_NOT_CONFIGURED",
670
688
  "MAIL_FROM_NOT_CONFIGURED",
@@ -1658,8 +1676,11 @@ var ListAdminUsersRequestSchema = import_zod_openapi19.z.object({
1658
1676
  page: import_zod_openapi19.z.coerce.number().int().min(1).optional().default(1),
1659
1677
  limit: import_zod_openapi19.z.coerce.number().int().min(1).max(100).optional().default(50)
1660
1678
  });
1679
+ var AdminUserListItemSchema = UserPublicSchema.extend({
1680
+ linkedProviders: import_zod_openapi19.z.array(import_zod_openapi19.z.string())
1681
+ });
1661
1682
  var ListAdminUsersResponseSchema = import_zod_openapi19.z.object({
1662
- users: import_zod_openapi19.z.array(UserPublicSchema),
1683
+ users: import_zod_openapi19.z.array(AdminUserListItemSchema),
1663
1684
  pager: AdminPagerSchema
1664
1685
  });
1665
1686
  var SearchAdminUsersByEmailRequestSchema = import_zod_openapi19.z.object({
@@ -1694,8 +1715,7 @@ var InviteUsersResponseSchema = import_zod_openapi19.z.object({
1694
1715
  results: import_zod_openapi19.z.array(InvitedUserResultSchema)
1695
1716
  });
1696
1717
  var EditAdminUserRequestSchema = import_zod_openapi19.z.object({
1697
- name: import_zod_openapi19.z.string().min(1),
1698
- email: import_zod_openapi19.z.string().email()
1718
+ name: import_zod_openapi19.z.string().min(1)
1699
1719
  });
1700
1720
  var AdminUserMutationResponseSchema = import_zod_openapi19.z.object({
1701
1721
  user: UserPublicSchema
@@ -1707,6 +1727,32 @@ var ResetPasswordResponseSchema = import_zod_openapi19.z.object({
1707
1727
  var UpdateAdminUserEmailRequestSchema = import_zod_openapi19.z.object({
1708
1728
  email: import_zod_openapi19.z.string().email()
1709
1729
  });
1730
+ var EmailLockedByFederatedIdentityErrorSchema = import_zod_openapi19.z.object({
1731
+ error: import_zod_openapi19.z.object({
1732
+ code: import_zod_openapi19.z.literal("EMAIL_LOCKED_BY_FEDERATED_IDENTITY"),
1733
+ message: import_zod_openapi19.z.string()
1734
+ })
1735
+ });
1736
+ var AdminUserIdentityParamSchema = AdminUserIdParamSchema.extend({
1737
+ provider: import_zod_openapi19.z.string()
1738
+ });
1739
+ var UnlinkUserIdentityResponseSchema = import_zod_openapi19.z.object({
1740
+ user: UserPublicSchema,
1741
+ passwordIssued: import_zod_openapi19.z.boolean(),
1742
+ newPassword: import_zod_openapi19.z.string().optional()
1743
+ });
1744
+ var UnlinkUserIdentityNotFoundErrorSchema = import_zod_openapi19.z.object({
1745
+ error: import_zod_openapi19.z.object({
1746
+ code: import_zod_openapi19.z.enum(["NOT_FOUND", "NOT_LINKED"]),
1747
+ message: import_zod_openapi19.z.string()
1748
+ })
1749
+ });
1750
+ var UnlinkUserIdentityConflictErrorSchema = import_zod_openapi19.z.object({
1751
+ error: import_zod_openapi19.z.object({
1752
+ code: import_zod_openapi19.z.enum(["CANNOT_UNLINK_SELF", "PASSWORD_AUTH_DISABLED"]),
1753
+ message: import_zod_openapi19.z.string()
1754
+ })
1755
+ });
1710
1756
  var DeleteAdminUserResponseSchema = import_zod_openapi19.z.object({
1711
1757
  deletedId: import_zod_openapi19.z.string()
1712
1758
  });
@@ -1810,7 +1856,7 @@ var editUserRoute = (0, import_zod_openapi20.createRoute)({
1810
1856
  path: "/admin/users/{id}",
1811
1857
  tags: ["admin.users"],
1812
1858
  security: [{ bearerAuth: [] }],
1813
- summary: "Update a user's name and email",
1859
+ summary: "Update a user's name (email changes go through PUT /admin/users/{id}/email)",
1814
1860
  request: {
1815
1861
  params: AdminUserIdParamSchema,
1816
1862
  body: {
@@ -1838,10 +1884,6 @@ var editUserRoute = (0, import_zod_openapi20.createRoute)({
1838
1884
  description: "User not found",
1839
1885
  content: { "application/json": { schema: NotFoundErrorSchema } }
1840
1886
  },
1841
- 409: {
1842
- description: "Email already in use by another user",
1843
- content: { "application/json": { schema: ConflictErrorSchema } }
1844
- },
1845
1887
  500: {
1846
1888
  description: "Internal server error",
1847
1889
  content: { "application/json": { schema: InternalServerErrorSchema } }
@@ -2102,8 +2144,48 @@ var updateUserEmailRoute = (0, import_zod_openapi20.createRoute)({
2102
2144
  content: { "application/json": { schema: NotFoundErrorSchema } }
2103
2145
  },
2104
2146
  409: {
2105
- description: "Email already in use by another user",
2106
- content: { "application/json": { schema: ConflictErrorSchema } }
2147
+ description: "Email already in use by another user, or locked by a linked federated identity",
2148
+ content: { "application/json": { schema: import_zod_openapi20.z.union([ConflictErrorSchema, EmailLockedByFederatedIdentityErrorSchema]) } }
2149
+ },
2150
+ 500: {
2151
+ description: "Internal server error",
2152
+ content: { "application/json": { schema: InternalServerErrorSchema } }
2153
+ }
2154
+ }
2155
+ });
2156
+ var unlinkUserIdentityRoute = (0, import_zod_openapi20.createRoute)({
2157
+ method: "delete",
2158
+ path: "/admin/users/{id}/identities/{provider}",
2159
+ tags: ["admin.users"],
2160
+ security: [{ bearerAuth: [] }],
2161
+ summary: "Unlink a user's federated identity for a provider (admin-initiated)",
2162
+ request: {
2163
+ params: AdminUserIdentityParamSchema
2164
+ },
2165
+ responses: {
2166
+ 200: {
2167
+ description: "Identity removed; passwordIssued/newPassword report whether a password was generated",
2168
+ content: { "application/json": { schema: UnlinkUserIdentityResponseSchema } }
2169
+ },
2170
+ 400: {
2171
+ description: "Invalid id",
2172
+ content: { "application/json": { schema: ValidationErrorSchema } }
2173
+ },
2174
+ 401: {
2175
+ description: "Authentication required",
2176
+ content: { "application/json": { schema: AuthenticationRequiredErrorSchema } }
2177
+ },
2178
+ 403: {
2179
+ description: "Admin permission required",
2180
+ content: { "application/json": { schema: AdminRequiredErrorSchema } }
2181
+ },
2182
+ 404: {
2183
+ description: "User not found, or the user has no identity for this provider",
2184
+ content: { "application/json": { schema: UnlinkUserIdentityNotFoundErrorSchema } }
2185
+ },
2186
+ 409: {
2187
+ description: "Refused: the target is the operating admin themself, or password auth is disabled instance-wide",
2188
+ content: { "application/json": { schema: UnlinkUserIdentityConflictErrorSchema } }
2107
2189
  },
2108
2190
  500: {
2109
2191
  description: "Internal server error",
@@ -2188,6 +2270,7 @@ var adminUsersRoutes = {
2188
2270
  resetPasswordRoute,
2189
2271
  resendInviteRoute,
2190
2272
  updateUserEmailRoute,
2273
+ unlinkUserIdentityRoute,
2191
2274
  pendingUsersCountRoute,
2192
2275
  deleteUserRoute
2193
2276
  };
@@ -6545,12 +6628,28 @@ var FederatedHandoffResponseSchema = TokenAuthResponseSchema;
6545
6628
  var LinkedAuthProviderListResponseSchema = import_zod_openapi66.z.object({
6546
6629
  identities: import_zod_openapi66.z.array(import_zod_openapi66.z.object({ provider: import_zod_openapi66.z.string() }))
6547
6630
  });
6548
- var CreateLinkGrantRequestSchema = import_zod_openapi66.z.object({
6549
- /** RFC 7638 thumbprint of the P-256 public key this browser will use at `/start` — binds the grant to this browser (AC-2). */
6550
- handoffChallenge: import_zod_openapi66.z.string().min(1)
6631
+ var LinkCompletionCodeSchema = import_zod_openapi66.z.string().regex(/^[A-Za-z0-9_-]{43}$/, "must be a 43-character base64url completion code");
6632
+ var StartProviderLinkResponseSchema = import_zod_openapi66.z.object({
6633
+ authorizationUrl: import_zod_openapi66.z.string().url()
6634
+ });
6635
+ var PendingLinkCompletionResponseSchema = import_zod_openapi66.z.object({
6636
+ provider: import_zod_openapi66.z.string(),
6637
+ accountLabel: import_zod_openapi66.z.string().optional()
6551
6638
  });
6552
- var CreateLinkGrantResponseSchema = import_zod_openapi66.z.object({
6553
- linkGrant: import_zod_openapi66.z.string()
6639
+ var CompleteProviderLinkResponseSchema = import_zod_openapi66.z.object({
6640
+ result: import_zod_openapi66.z.literal("linked")
6641
+ });
6642
+ var LinkCompletionConsumedErrorSchema = ApiErrorSchema.extend({
6643
+ error: import_zod_openapi66.z.object({
6644
+ code: import_zod_openapi66.z.literal("LINK_COMPLETION_CONSUMED"),
6645
+ message: import_zod_openapi66.z.string()
6646
+ })
6647
+ });
6648
+ var CompleteProviderLinkConflictErrorSchema = ApiErrorSchema.extend({
6649
+ error: import_zod_openapi66.z.object({
6650
+ code: import_zod_openapi66.z.enum(["FEDERATED_IDENTITY_IN_USE", "FEDERATED_LINK_AUTH_STATE_CHANGED", "FEDERATED_LINK_NOT_LINKED"]),
6651
+ message: import_zod_openapi66.z.string()
6652
+ })
6554
6653
  });
6555
6654
  var UnlinkAuthProviderErrorSchema = import_zod_openapi66.z.object({
6556
6655
  error: import_zod_openapi66.z.object({
@@ -6581,7 +6680,7 @@ var startFederatedProviderRoute = (0, import_zod_openapi67.createRoute)({
6581
6680
  method: "get",
6582
6681
  path: "/auth/providers/{name}/start",
6583
6682
  tags: ["federatedAuth"],
6584
- summary: "Top-level navigation that redirects the browser to the named provider",
6683
+ summary: "Top-level navigation that redirects the browser to the named provider (public sign-in ONLY)",
6585
6684
  request: {
6586
6685
  params: import_zod_openapi67.z.object({ name: import_zod_openapi67.z.string() }),
6587
6686
  query: import_zod_openapi67.z.object({
@@ -6589,31 +6688,13 @@ var startFederatedProviderRoute = (0, import_zod_openapi67.createRoute)({
6589
6688
  /** base64url(JSON) of the sender's P-256 public JWK. */
6590
6689
  handoff_jwk: import_zod_openapi67.z.string().min(1),
6591
6690
  /** base64url ES256 signature over the start canonical message. */
6592
- handoff_proof: import_zod_openapi67.z.string().min(1),
6593
- /**
6594
- * RFC-0014 phase 3 — `'1'` switches this start into LINK mode: the
6595
- * request must carry a web-session JWT, and the flow attaches the
6596
- * resulting identity to that session's user instead of signing
6597
- * anyone in. Absent (the ordinary sign-in start) the route stays
6598
- * fully public.
6599
- */
6600
- link: import_zod_openapi67.z.literal("1").optional(),
6601
- /** The opaque id from `POST /auth/providers/{name}/link-grants`. Required when `link=1`, ignored otherwise. */
6602
- link_grant: import_zod_openapi67.z.string().min(1).optional()
6691
+ handoff_proof: import_zod_openapi67.z.string().min(1)
6603
6692
  })
6604
6693
  },
6605
6694
  responses: {
6606
6695
  302: { description: "Redirect to the provider authorization endpoint" },
6607
6696
  400: {
6608
- description: "Malformed continue / sender proof, or an invalid/expired/mismatched link grant",
6609
- content: { "application/json": { schema: ApiErrorSchema } }
6610
- },
6611
- 401: {
6612
- description: "link=1 without a web-session JWT \u2014 never downgraded to the public sign-in start",
6613
- content: { "application/json": { schema: ApiErrorSchema } }
6614
- },
6615
- 403: {
6616
- description: "link=1 with a non-web credential (PAT / OAuth access token)",
6697
+ description: "Malformed continue / sender proof, OR a raw `link` query key is present (any value) \u2014 the retired link-via-GET flow is gone entirely; a raw `link` key is always rejected rather than silently downgraded to public sign-in.",
6617
6698
  content: { "application/json": { schema: ApiErrorSchema } }
6618
6699
  },
6619
6700
  404: {
@@ -6646,32 +6727,113 @@ var listLinkedAuthProvidersRoute = (0, import_zod_openapi67.createRoute)({
6646
6727
  }
6647
6728
  }
6648
6729
  });
6649
- var createAuthProviderLinkGrantRoute = (0, import_zod_openapi67.createRoute)({
6730
+ var startProviderLinkRoute = (0, import_zod_openapi67.createRoute)({
6650
6731
  method: "post",
6651
- path: "/auth/providers/{name}/link-grants",
6732
+ path: "/auth/providers/{name}/link-start",
6652
6733
  tags: ["federatedAuth"],
6653
- summary: "Mint a short-lived, opaque grant that authorizes ONE link start for the current web session",
6734
+ summary: "Mint an IdP authorization URL + flow-specific state cookie for the current web session (stage 1 of 3)",
6654
6735
  request: {
6655
- params: import_zod_openapi67.z.object({ name: import_zod_openapi67.z.string() }),
6656
- body: { content: { "application/json": { schema: CreateLinkGrantRequestSchema } } }
6736
+ params: import_zod_openapi67.z.object({ name: import_zod_openapi67.z.string() })
6657
6737
  },
6658
6738
  responses: {
6659
6739
  200: {
6660
- description: "Opaque single-use grant id",
6661
- content: { "application/json": { schema: CreateLinkGrantResponseSchema } }
6740
+ description: "Authorization URL to navigate the browser to. Sets a flow-specific, 300s state cookie.",
6741
+ content: { "application/json": { schema: StartProviderLinkResponseSchema } }
6742
+ },
6743
+ 400: {
6744
+ description: "The signed link-state cookie value would exceed its per-cookie byte limit, or the aggregate Cookie-header admission budget cannot be satisfied even after pruning \u2014 no Set-Cookie or authorizationUrl is returned.",
6745
+ content: { "application/json": { schema: ApiErrorSchema } }
6662
6746
  },
6663
6747
  401: {
6664
- description: "Authentication required",
6748
+ description: "Authentication required (credential missing/invalid \u2014 resolved by middleware before this route's own validation)",
6665
6749
  content: { "application/json": { schema: AuthenticationRequiredErrorSchema } }
6666
6750
  },
6667
6751
  403: {
6668
- description: "Non-web credential (PAT / OAuth access token)",
6752
+ description: "Non-web credential (PAT / OAuth access token) \u2014 linking is a session-level account change",
6669
6753
  content: { "application/json": { schema: ApiErrorSchema } }
6670
6754
  },
6671
6755
  404: {
6672
6756
  description: "Unknown, unconfigured, or credential-kind provider",
6673
6757
  content: { "application/json": { schema: ApiErrorSchema } }
6674
6758
  },
6759
+ 500: {
6760
+ description: "Internal server error (e.g. a declared multi-instance topology with no reachable Redis)",
6761
+ content: { "application/json": { schema: InternalServerErrorSchema } }
6762
+ }
6763
+ }
6764
+ });
6765
+ var getProviderLinkCompletionRoute = (0, import_zod_openapi67.createRoute)({
6766
+ method: "get",
6767
+ path: "/auth/providers/{name}/link-completions/{code}",
6768
+ tags: ["federatedAuth"],
6769
+ summary: "Read a pending link completion's confirmation details (stage 3a \u2014 non-destructive)",
6770
+ request: {
6771
+ params: import_zod_openapi67.z.object({ name: import_zod_openapi67.z.string(), code: LinkCompletionCodeSchema })
6772
+ },
6773
+ responses: {
6774
+ 200: {
6775
+ description: "Pending, unconsumed completion bound to the caller \u2014 provider label fallback + optional display-only accountLabel",
6776
+ content: { "application/json": { schema: PendingLinkCompletionResponseSchema } }
6777
+ },
6778
+ 400: {
6779
+ description: "Authenticated but `{code}` fails the 43-character base64url shape (VALIDATION_ERROR)",
6780
+ content: { "application/json": { schema: ValidationErrorSchema } }
6781
+ },
6782
+ 401: {
6783
+ description: "Authentication required \u2014 resolved by middleware before this route's own `{code}` shape validation, so an unauthenticated + malformed code is still 401, never 400",
6784
+ content: { "application/json": { schema: AuthenticationRequiredErrorSchema } }
6785
+ },
6786
+ 403: {
6787
+ description: "Non-web credential (PAT / OAuth access token)",
6788
+ content: { "application/json": { schema: ApiErrorSchema } }
6789
+ },
6790
+ 404: {
6791
+ description: "Never-issued, expired, retention-expired, or bound to a different user/provider/authVersion \u2014 all collapse to the same generic NOT_FOUND (no result-unknown code exists)",
6792
+ content: { "application/json": { schema: ApiErrorSchema } }
6793
+ },
6794
+ 409: {
6795
+ description: "The caller's own completion was already consumed",
6796
+ content: { "application/json": { schema: LinkCompletionConsumedErrorSchema } }
6797
+ },
6798
+ 500: {
6799
+ description: "Internal server error",
6800
+ content: { "application/json": { schema: InternalServerErrorSchema } }
6801
+ }
6802
+ }
6803
+ });
6804
+ var completeProviderLinkRoute = (0, import_zod_openapi67.createRoute)({
6805
+ method: "post",
6806
+ path: "/auth/providers/{name}/link-completions/{code}",
6807
+ tags: ["federatedAuth"],
6808
+ summary: "Atomically consume a link completion code and insert the identity (stage 3b \u2014 terminal)",
6809
+ request: {
6810
+ params: import_zod_openapi67.z.object({ name: import_zod_openapi67.z.string(), code: LinkCompletionCodeSchema })
6811
+ },
6812
+ responses: {
6813
+ 200: {
6814
+ description: "Linked (fresh winner OR an already-consumed replay that resolves to the same owner) \u2014 the same body either way",
6815
+ content: { "application/json": { schema: CompleteProviderLinkResponseSchema } }
6816
+ },
6817
+ 400: {
6818
+ description: "Authenticated but `{code}` fails the 43-character base64url shape (VALIDATION_ERROR)",
6819
+ content: { "application/json": { schema: ValidationErrorSchema } }
6820
+ },
6821
+ 401: {
6822
+ description: "Authentication required \u2014 resolved by middleware before this route's own `{code}` shape validation, so an unauthenticated + malformed code is still 401, never 400",
6823
+ content: { "application/json": { schema: AuthenticationRequiredErrorSchema } }
6824
+ },
6825
+ 403: {
6826
+ description: "Non-web credential (PAT / OAuth access token)",
6827
+ content: { "application/json": { schema: ApiErrorSchema } }
6828
+ },
6829
+ 404: {
6830
+ description: "Never-issued, expired, retention-expired, or bound to a different user/provider \u2014 all collapse to the same generic NOT_FOUND",
6831
+ content: { "application/json": { schema: ApiErrorSchema } }
6832
+ },
6833
+ 409: {
6834
+ description: "FEDERATED_IDENTITY_IN_USE (provider account owned by someone else, or this user already has a different account of this provider), FEDERATED_LINK_AUTH_STATE_CHANGED (fresh User re-read found the session inactive or authVersion changed since link-start), or FEDERATED_LINK_NOT_LINKED (an already-consumed replay whose original insert has not landed) \u2014 no other conflict code exists.",
6835
+ content: { "application/json": { schema: CompleteProviderLinkConflictErrorSchema } }
6836
+ },
6675
6837
  500: {
6676
6838
  description: "Internal server error",
6677
6839
  content: { "application/json": { schema: InternalServerErrorSchema } }
@@ -6725,7 +6887,7 @@ var callbackFederatedProviderRoute = (0, import_zod_openapi67.createRoute)({
6725
6887
  },
6726
6888
  responses: {
6727
6889
  302: {
6728
- description: "Redirect to the trusted web login/complete page on success, or back to the trusted web /login on failure"
6890
+ description: "Ordinary sign-in: redirect to the trusted web login/complete page on success, or back to the trusted web /login on failure. Link flow (query `state` in the reserved crowilnk_ namespace): success redirects to `/me?provider=<name>&link_completion=<code>` (provider + completion code ONLY); failure redirects to `/me?provider=<name>&link=link_failed` (provider + the generic marker ONLY \u2014 never a completion code, never accountLabel, never the underlying reason)."
6729
6891
  },
6730
6892
  404: {
6731
6893
  description: "Unknown or unconfigured provider (also used when trusted origins cannot be resolved)",
@@ -6770,7 +6932,9 @@ var federatedAuthRoutes = {
6770
6932
  callbackFederatedProviderRoute,
6771
6933
  federatedHandoffRoute,
6772
6934
  listLinkedAuthProvidersRoute,
6773
- createAuthProviderLinkGrantRoute,
6935
+ startProviderLinkRoute,
6936
+ getProviderLinkCompletionRoute,
6937
+ completeProviderLinkRoute,
6774
6938
  unlinkAuthProviderRoute
6775
6939
  };
6776
6940
 
@@ -7658,6 +7822,7 @@ var stubSearchAdminUsersByEmail = { users: [] };
7658
7822
  var stubInviteUsers = { results: [] };
7659
7823
  var stubAdminUserMutation = { user: stubUserPublic };
7660
7824
  var stubResetPassword = { user: stubUserPublic, newPassword: "" };
7825
+ var stubUnlinkUserIdentity = { user: stubUserPublic, passwordIssued: false };
7661
7826
  var stubDeleteAdminUser = { deletedId: "" };
7662
7827
  var stubPendingUsersCount = { count: 0 };
7663
7828
  var stubListPlugins = { plugins: [] };
@@ -7703,9 +7868,9 @@ var bookmarkBacklinkCommentRevisionChain = new import_zod_openapi79.OpenAPIHono(
7703
7868
  var pageChain = new import_zod_openapi79.OpenAPIHono().openapi(pageRoutes.getPageRoute, (c) => c.json(stubPageWithRevision, 200)).openapi(pageRoutes.listPagesRoute, (c) => c.json(stubListPages, 200)).openapi(pageRoutes.listPageChildrenRoute, (c) => c.json(stubListPageChildren, 200)).openapi(pageRoutes.createPageRoute, (c) => c.json(stubPageResponse, 200)).openapi(pageRoutes.updatePageRoute, (c) => c.json(stubPageResponse, 200)).openapi(pageRoutes.setPageGrantRoute, (c) => c.json(stubPageResponse, 200)).openapi(pageRoutes.seenPageRoute, (c) => c.json(stubSeenUsers, 200)).openapi(pageRoutes.getSeenUsersRoute, (c) => c.json(stubSeenUsers, 200)).openapi(pageRoutes.likePageRoute, (c) => c.json(stubPageResponse, 200)).openapi(pageRoutes.unlikePageRoute, (c) => c.json(stubPageResponse, 200)).openapi(pageRoutes.claimPageLinkAccessRoute, (c) => c.json({ ...stubPageWithRevision, granted: false }, 200)).openapi(pageRoutes.getWatchStatusRoute, (c) => c.json(stubWatchStatus, 200)).openapi(pageRoutes.setWatchStatusRoute, (c) => c.json(stubWatchStatus, 200)).openapi(pageRoutes.deletePageRoute, (c) => c.json(stubPageResponse, 200)).openapi(pageRoutes.revertDeletedPageRoute, (c) => c.json(stubPageResponse, 200)).openapi(pageRoutes.revertToRevisionRoute, (c) => c.json(stubPageResponse, 200)).openapi(pageRoutes.renamePageRoute, (c) => c.json({ ...stubPageResponse, renamed_count: 1 }, 200)).openapi(pageRoutes.renameSubtreeRoute, (c) => c.json({ renamed_count: 0 }, 200)).openapi(pagePreviewRoutes.previewPageRoute, (c) => c.json(stubPreview, 200)).openapi(pageCollabRoutes.getYjsTokenRoute, (c) => c.json(stubWsToken, 200)).openapi(presenceRoutes.getPresenceTokenRoute, (c) => c.json(stubPresenceToken, 200)).openapi(presenceRoutes.getLikersRoute, (c) => c.json(stubLikers, 200));
7704
7869
  var lateContractApp = new import_zod_openapi79.OpenAPIHono().openapi(draftRoutes.createDraftRoute, (c) => c.json(stubCreateDraft, 201)).openapi(draftRoutes.listDraftsRoute, (c) => c.json(stubListDrafts, 200)).openapi(draftRoutes.cancelDraftRoute, (c) => c.json(stubCreateDraft, 200)).openapi(autocompleteRoutes.autocompleteUsersRoute, (c) => c.json(stubAutocomplete, 200)).openapi(autocompleteRoutes.autocompletePagesRoute, (c) => c.json(stubAutocomplete, 200)).openapi(attachmentRoutes.getAttachmentUsageRoute, (c) => c.json(stubAttachmentUsage, 200)).openapi(attachmentRoutes.listAttachmentsRoute, (c) => c.json(stubListAttachments, 200)).openapi(attachmentRoutes.addAttachmentRoute, (c) => c.json(stubAddAttachment, 200)).openapi(attachmentRoutes.uploadAttachmentRoute, (c) => c.json(stubUploadAttachment, 200)).openapi(attachmentRoutes.getAttachmentMetaRoute, (c) => c.json(stubAttachmentMeta, 200)).openapi(attachmentRoutes.removeAttachmentRoute, (c) => c.json(stubRemoveAttachment, 200)).openapi(attachmentRoutes.getUploadPolicyRoute, (c) => c.json(stubUploadPolicy, 200)).openapi(searchRoutes.searchPagesRoute, (c) => c.json(stubSearchPages, 200)).openapi(adminCryptoRoutes.getCryptoStatusRoute, (c) => c.json(stubCryptoStatus, 200)).openapi(adminCryptoRoutes.reencryptAllRoute, (c) => c.json(stubReencrypt, 200)).openapi(notificationRoutes.listNotificationsRoute, (c) => c.json(stubListNotifications, 200)).openapi(notificationRoutes.markAllAsReadRoute, (c) => c.json(stubMarkAllAsRead, 200)).openapi(notificationRoutes.getNotificationsTokenRoute, (c) => c.json(stubNotificationsToken, 200)).openapi(notificationRoutes.getUnreadCountRoute, (c) => c.json(stubNotificationStatus, 200)).openapi(notificationRoutes.openNotificationRoute, (c) => c.json(stubOpenNotification, 200));
7705
7870
  var adminSettingsContractApp = new import_zod_openapi79.OpenAPIHono().openapi(adminAppRoutes.getAppSettingsRoute, (c) => c.json(stubGetAppSettings, 200)).openapi(adminAppRoutes.updateAppSettingsRoute, (c) => c.json(stubUpdateAppSettings, 200)).openapi(adminAuthRoutes.getAuthSettingsRoute, (c) => c.json(stubAuthSettings, 200)).openapi(adminAuthRoutes.updateAuthSettingsRoute, (c) => c.json(stubAuthSettings, 200)).openapi(adminSecurityRoutes.getSecuritySettingsRoute, (c) => c.json(stubSecuritySettings, 200)).openapi(adminSecurityRoutes.updateSecuritySettingsRoute, (c) => c.json(stubSecuritySettings, 200)).openapi(adminMailRoutes.getMailSettingsRoute, (c) => c.json(stubMailSettings, 200)).openapi(adminMailRoutes.updateMailSettingsRoute, (c) => c.json(stubUpdateMailSettings, 200)).openapi(adminMailRoutes.sendTestMailRoute, (c) => c.json(stubSendTestMail, 200)).openapi(adminStorageRoutes.getStorageStatusRoute, (c) => c.json(stubStorageStatus, 200)).openapi(adminSearchRoutes.getSearchStatusRoute, (c) => c.json(stubSearchStatus, 200));
7706
- var adminUsersPluginsContractApp = new import_zod_openapi79.OpenAPIHono().openapi(adminUsersRoutes.listUsersRoute, (c) => c.json(stubListAdminUsers, 200)).openapi(adminUsersRoutes.searchUsersByEmailRoute, (c) => c.json(stubSearchAdminUsersByEmail, 200)).openapi(adminUsersRoutes.pendingUsersCountRoute, (c) => c.json(stubPendingUsersCount, 200)).openapi(adminUsersRoutes.inviteUsersRoute, (c) => c.json(stubInviteUsers, 200)).openapi(adminUsersRoutes.editUserRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.makeAdminRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.removeFromAdminRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.activateUserRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.suspendUserRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.resetPasswordRoute, (c) => c.json(stubResetPassword, 200)).openapi(adminUsersRoutes.resendInviteRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.updateUserEmailRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.deleteUserRoute, (c) => c.json(stubDeleteAdminUser, 200)).openapi(adminPluginsRoutes.listPluginsRoute, (c) => c.json(stubListPlugins, 200)).openapi(adminPluginsRoutes.getPluginConfigRoute, (c) => c.json(stubPluginConfig, 200)).openapi(adminPluginsRoutes.updatePluginConfigRoute, (c) => c.json(stubUpdatePluginConfig, 200)).openapi(adminPluginsRoutes.getPluginReadinessRoute, (c) => c.json(stubPluginReadiness, 200)).openapi(adminPluginsRoutes.clearRenderCacheAllRoute, (c) => c.json(stubClearRenderCache, 200)).openapi(adminPluginsRoutes.clearRenderCachePluginRoute, (c) => c.json(stubClearRenderCache, 200));
7871
+ var adminUsersPluginsContractApp = new import_zod_openapi79.OpenAPIHono().openapi(adminUsersRoutes.listUsersRoute, (c) => c.json(stubListAdminUsers, 200)).openapi(adminUsersRoutes.searchUsersByEmailRoute, (c) => c.json(stubSearchAdminUsersByEmail, 200)).openapi(adminUsersRoutes.pendingUsersCountRoute, (c) => c.json(stubPendingUsersCount, 200)).openapi(adminUsersRoutes.inviteUsersRoute, (c) => c.json(stubInviteUsers, 200)).openapi(adminUsersRoutes.editUserRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.makeAdminRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.removeFromAdminRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.activateUserRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.suspendUserRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.resetPasswordRoute, (c) => c.json(stubResetPassword, 200)).openapi(adminUsersRoutes.resendInviteRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.updateUserEmailRoute, (c) => c.json(stubAdminUserMutation, 200)).openapi(adminUsersRoutes.unlinkUserIdentityRoute, (c) => c.json(stubUnlinkUserIdentity, 200)).openapi(adminUsersRoutes.deleteUserRoute, (c) => c.json(stubDeleteAdminUser, 200)).openapi(adminPluginsRoutes.listPluginsRoute, (c) => c.json(stubListPlugins, 200)).openapi(adminPluginsRoutes.getPluginConfigRoute, (c) => c.json(stubPluginConfig, 200)).openapi(adminPluginsRoutes.updatePluginConfigRoute, (c) => c.json(stubUpdatePluginConfig, 200)).openapi(adminPluginsRoutes.getPluginReadinessRoute, (c) => c.json(stubPluginReadiness, 200)).openapi(adminPluginsRoutes.clearRenderCacheAllRoute, (c) => c.json(stubClearRenderCache, 200)).openapi(adminPluginsRoutes.clearRenderCachePluginRoute, (c) => c.json(stubClearRenderCache, 200));
7707
7872
  var oauthContractApp = new import_zod_openapi79.OpenAPIHono().openapi(oauthRoutes.authorizeRoute, (c) => c.json(stubAuthorize, 200)).openapi(oauthRoutes.tokenRoute, (c) => c.json(stubToken, 200)).openapi(oauthRoutes.revokeRoute, (c) => c.json(stubRevoke, 200)).openapi(oauthRoutes.discoveryRoute, (c) => c.json(stubDiscovery, 200)).openapi(oauthRoutes.deviceAuthorizeRoute, (c) => c.json(stubDeviceAuthorize, 200)).openapi(oauthRoutes.deviceInfoRoute, (c) => c.json(stubDeviceInfo, 200)).openapi(oauthRoutes.deviceVerifyRoute, (c) => c.json(stubDeviceVerify, 200)).openapi(oauthRoutes.clientInfoRoute, (c) => c.json(stubClientInfo, 200));
7708
- var federatedAuthContractApp = new import_zod_openapi79.OpenAPIHono().openapi(federatedAuthRoutes.listFederatedProvidersRoute, (c) => c.json(stubProviderList, 200)).openapi(federatedAuthRoutes.startFederatedProviderRoute, (c) => c.redirect("", 302)).openapi(federatedAuthRoutes.callbackFederatedProviderRoute, (c) => c.redirect("", 302)).openapi(federatedAuthRoutes.federatedHandoffRoute, (c) => c.json(stubTokens, 200)).openapi(federatedAuthRoutes.listLinkedAuthProvidersRoute, (c) => c.json({ identities: [] }, 200)).openapi(federatedAuthRoutes.createAuthProviderLinkGrantRoute, (c) => c.json({ linkGrant: "" }, 200)).openapi(federatedAuthRoutes.unlinkAuthProviderRoute, (c) => c.body(null, 204));
7873
+ var federatedAuthContractApp = new import_zod_openapi79.OpenAPIHono().openapi(federatedAuthRoutes.listFederatedProvidersRoute, (c) => c.json(stubProviderList, 200)).openapi(federatedAuthRoutes.startFederatedProviderRoute, (c) => c.redirect("", 302)).openapi(federatedAuthRoutes.callbackFederatedProviderRoute, (c) => c.redirect("", 302)).openapi(federatedAuthRoutes.federatedHandoffRoute, (c) => c.json(stubTokens, 200)).openapi(federatedAuthRoutes.listLinkedAuthProvidersRoute, (c) => c.json({ identities: [] }, 200)).openapi(federatedAuthRoutes.startProviderLinkRoute, (c) => c.json({ authorizationUrl: "" }, 200)).openapi(federatedAuthRoutes.getProviderLinkCompletionRoute, (c) => c.json({ provider: "" }, 200)).openapi(federatedAuthRoutes.completeProviderLinkRoute, (c) => c.json({ result: "linked" }, 200)).openapi(federatedAuthRoutes.unlinkAuthProviderRoute, (c) => c.body(null, 204));
7709
7874
  var federatedRegistrationContractApp = new import_zod_openapi79.OpenAPIHono().openapi(federatedRegistrationRoutes.getFederatedRegistrationRoute, (c) => c.json(stubFederatedRegistrationSnapshot, 200)).openapi(federatedRegistrationRoutes.submitFederatedRegistrationRoute, (c) => c.json({ status: "approval_required" }, 200)).openapi(federatedRegistrationRoutes.logoutFederatedRegistrationRoute, (c) => c.body(null, 204));
7710
7875
  var createClient = (baseUrl, options = {}) => (0, import_client.hc)(baseUrl, {
7711
7876
  headers: options.headers,
@@ -7942,6 +8107,8 @@ var WS_CLOSE_CODES = {
7942
8107
  AdminRequiredErrorSchema,
7943
8108
  AdminSidebarSection,
7944
8109
  AdminUserIdParamSchema,
8110
+ AdminUserIdentityParamSchema,
8111
+ AdminUserListItemSchema,
7945
8112
  AdminUserMutationResponseSchema,
7946
8113
  ApiErrorSchema,
7947
8114
  AppInfoResponseSchema,
@@ -7977,6 +8144,8 @@ var WS_CLOSE_CODES = {
7977
8144
  CommentInvalidRequestErrorSchema,
7978
8145
  CommentNotFoundErrorSchema,
7979
8146
  CommentSchema,
8147
+ CompleteProviderLinkConflictErrorSchema,
8148
+ CompleteProviderLinkResponseSchema,
7980
8149
  ConfigReadinessIssueSchema,
7981
8150
  ConfigReadinessResponseSchema,
7982
8151
  ConfirmEmailChangeRequestSchema,
@@ -7989,8 +8158,6 @@ var WS_CLOSE_CODES = {
7989
8158
  CreateAdminResponseSchema,
7990
8159
  CreateDraftRequestSchema,
7991
8160
  CreateDraftResponseSchema,
7992
- CreateLinkGrantRequestSchema,
7993
- CreateLinkGrantResponseSchema,
7994
8161
  CreatePageRequestSchema,
7995
8162
  CrowiCodeSidecarSchema,
7996
8163
  CrowiDiagramNodeSchema,
@@ -8025,6 +8192,7 @@ var WS_CLOSE_CODES = {
8025
8192
  DraftSummarySchema,
8026
8193
  ERROR_CODES,
8027
8194
  EditAdminUserRequestSchema,
8195
+ EmailLockedByFederatedIdentityErrorSchema,
8028
8196
  EncryptionNotConfiguredErrorSchema,
8029
8197
  ErrorCodeSchema,
8030
8198
  FRONTMATTER_MAX_ENTRIES,
@@ -8080,6 +8248,8 @@ var WS_CLOSE_CODES = {
8080
8248
  LanguageSchema,
8081
8249
  LikerSchema,
8082
8250
  LikersResponseSchema,
8251
+ LinkCompletionCodeSchema,
8252
+ LinkCompletionConsumedErrorSchema,
8083
8253
  LinkedAuthProviderListResponseSchema,
8084
8254
  ListAccessTokensResponseSchema,
8085
8255
  ListAdminUsersRequestSchema,
@@ -8144,6 +8314,7 @@ var WS_CLOSE_CODES = {
8144
8314
  PasswordErrorResponseSchema,
8145
8315
  PasswordUpdateSuccessSchema,
8146
8316
  PastAttachmentUsageSchema,
8317
+ PendingLinkCompletionResponseSchema,
8147
8318
  PendingUsersCountResponseSchema,
8148
8319
  PictureUploadResponseSchema,
8149
8320
  PluginAdminPlacementSchema,
@@ -8223,6 +8394,7 @@ var WS_CLOSE_CODES = {
8223
8394
  ShikiTokenLinesSchema,
8224
8395
  ShikiTokenSchema,
8225
8396
  ShikiTokenStyleSchema,
8397
+ StartProviderLinkResponseSchema,
8226
8398
  StorageDriverEntrySchema,
8227
8399
  SuccessResponseSchema,
8228
8400
  ThemeSchema,
@@ -8237,6 +8409,9 @@ var WS_CLOSE_CODES = {
8237
8409
  TokenResponseSchema,
8238
8410
  UPLOAD_ALLOWED_MIME,
8239
8411
  UnlinkAuthProviderErrorSchema,
8412
+ UnlinkUserIdentityConflictErrorSchema,
8413
+ UnlinkUserIdentityNotFoundErrorSchema,
8414
+ UnlinkUserIdentityResponseSchema,
8240
8415
  UpdateAdminUserEmailRequestSchema,
8241
8416
  UpdateAppSettingsRequestSchema,
8242
8417
  UpdateAppSettingsResponseSchema,
@@ -8308,10 +8483,10 @@ var WS_CLOSE_CODES = {
8308
8483
  clearRenderCachePluginRoute,
8309
8484
  clientInfoRoute,
8310
8485
  commentRoutes,
8486
+ completeProviderLinkRoute,
8311
8487
  confirmEmailChangeRoute,
8312
8488
  createAccessTokenRoute,
8313
8489
  createAdminRoute,
8314
- createAuthProviderLinkGrantRoute,
8315
8490
  createClient,
8316
8491
  createDraftRoute,
8317
8492
  createPageRoute,
@@ -8349,6 +8524,7 @@ var WS_CLOSE_CODES = {
8349
8524
  getPluginReadinessRoute,
8350
8525
  getPresenceTokenRoute,
8351
8526
  getProfileRoute,
8527
+ getProviderLinkCompletionRoute,
8352
8528
  getRevisionRoute,
8353
8529
  getRevisionsRoute,
8354
8530
  getSearchStatusRoute,
@@ -8422,6 +8598,7 @@ var WS_CLOSE_CODES = {
8422
8598
  setPageGrantRoute,
8423
8599
  setWatchStatusRoute,
8424
8600
  startFederatedProviderRoute,
8601
+ startProviderLinkRoute,
8425
8602
  stripKnownHtmlTags,
8426
8603
  submitFederatedRegistrationRoute,
8427
8604
  suspendUserRoute,
@@ -8434,6 +8611,7 @@ var WS_CLOSE_CODES = {
8434
8611
  tokenRoute,
8435
8612
  unlikePageRoute,
8436
8613
  unlinkAuthProviderRoute,
8614
+ unlinkUserIdentityRoute,
8437
8615
  unwrapRenderedAst,
8438
8616
  updateAppSettingsRoute,
8439
8617
  updateAuthSettingsRoute,