@schemavaults/auth-ui 0.5.56 → 0.6.28

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.
Files changed (220) hide show
  1. package/dist/components/AccountCard/account_card.d.ts +1 -0
  2. package/dist/components/AccountCard/account_card.js +4 -2
  3. package/dist/components/AccountCard/account_card.js.map +1 -1
  4. package/dist/components/AccountCard/index.d.ts +2 -2
  5. package/dist/components/AccountCard/index.js +1 -1
  6. package/dist/components/AccountCard/index.js.map +1 -1
  7. package/dist/components/ApiServersCard/api_servers_card.d.ts +4 -1
  8. package/dist/components/ApiServersCard/api_servers_card.js +11 -2
  9. package/dist/components/ApiServersCard/api_servers_card.js.map +1 -1
  10. package/dist/components/ApiServersCard/index.d.ts +2 -2
  11. package/dist/components/ApiServersCard/index.js +1 -1
  12. package/dist/components/ApiServersCard/index.js.map +1 -1
  13. package/dist/components/ApiServersTable/ApiServerRowActions.d.ts +6 -0
  14. package/dist/components/ApiServersTable/ApiServerRowActions.js +47 -0
  15. package/dist/components/ApiServersTable/ApiServerRowActions.js.map +1 -0
  16. package/dist/components/ApiServersTable/ApiServersTable.d.ts +3 -2
  17. package/dist/components/ApiServersTable/ApiServersTable.js +37 -24
  18. package/dist/components/ApiServersTable/ApiServersTable.js.map +1 -1
  19. package/dist/components/ApiServersTable/ApiServersTableConfigContext.d.ts +4 -0
  20. package/dist/components/ApiServersTable/ApiServersTableConfigContext.js +6 -0
  21. package/dist/components/ApiServersTable/ApiServersTableConfigContext.js.map +1 -0
  22. package/dist/components/ApiServersTable/columns.d.ts +2 -2
  23. package/dist/components/ApiServersTable/columns.js +5 -33
  24. package/dist/components/ApiServersTable/columns.js.map +1 -1
  25. package/dist/components/ApiServersTable/index.d.ts +6 -3
  26. package/dist/components/ApiServersTable/index.js +3 -1
  27. package/dist/components/ApiServersTable/index.js.map +1 -1
  28. package/dist/components/ApiServersTable/useApiServersList.d.ts +2 -3
  29. package/dist/components/ApiServersTable/useApiServersList.js +14 -47
  30. package/dist/components/ApiServersTable/useApiServersList.js.map +1 -1
  31. package/dist/components/AppsCard/apps_card.d.ts +3 -1
  32. package/dist/components/AppsCard/apps_card.js +13 -5
  33. package/dist/components/AppsCard/apps_card.js.map +1 -1
  34. package/dist/components/AppsCard/index.d.ts +3 -2
  35. package/dist/components/AppsCard/index.js +2 -1
  36. package/dist/components/AppsCard/index.js.map +1 -1
  37. package/dist/components/AppsTable/AppDomainsList.d.ts +2 -1
  38. package/dist/components/AppsTable/AppDomainsList.js +11 -5
  39. package/dist/components/AppsTable/AppDomainsList.js.map +1 -1
  40. package/dist/components/AppsTable/AppsTable.js +9 -13
  41. package/dist/components/AppsTable/AppsTable.js.map +1 -1
  42. package/dist/components/AppsTable/columns.d.ts +1 -1
  43. package/dist/components/AppsTable/columns.js +1 -1
  44. package/dist/components/AppsTable/columns.js.map +1 -1
  45. package/dist/components/AppsTable/frontend_app_actions.d.ts +1 -1
  46. package/dist/components/AppsTable/frontend_app_actions.js +71 -47
  47. package/dist/components/AppsTable/frontend_app_actions.js.map +1 -1
  48. package/dist/components/AppsTable/index.d.ts +4 -3
  49. package/dist/components/AppsTable/index.js +2 -1
  50. package/dist/components/AppsTable/index.js.map +1 -1
  51. package/dist/components/AppsTable/send-authorize-app-request.d.ts +1 -3
  52. package/dist/components/AppsTable/send-authorize-app-request.js +3 -33
  53. package/dist/components/AppsTable/send-authorize-app-request.js.map +1 -1
  54. package/dist/components/AppsTable/useAppDomains.d.ts +1 -1
  55. package/dist/components/AppsTable/useAppDomains.js +13 -53
  56. package/dist/components/AppsTable/useAppDomains.js.map +1 -1
  57. package/dist/components/AppsTable/useAppsList.d.ts +3 -24
  58. package/dist/components/AppsTable/useAppsList.js +12 -46
  59. package/dist/components/AppsTable/useAppsList.js.map +1 -1
  60. package/dist/components/ConnectAppToApiDialog/ConnectAppToApiDialog.d.ts +12 -2
  61. package/dist/components/ConnectAppToApiDialog/ConnectAppToApiDialog.js +43 -42
  62. package/dist/components/ConnectAppToApiDialog/ConnectAppToApiDialog.js.map +1 -1
  63. package/dist/components/ConnectAppToApiDialog/ConnectAppToApiDialogOpenDispatchContext.d.ts +2 -0
  64. package/dist/components/ConnectAppToApiDialog/ConnectAppToApiDialogOpenDispatchContext.js +8 -0
  65. package/dist/components/ConnectAppToApiDialog/ConnectAppToApiDialogOpenDispatchContext.js.map +1 -0
  66. package/dist/components/ConnectAppToApiDialog/index.d.ts +3 -2
  67. package/dist/components/ConnectAppToApiDialog/index.js +2 -1
  68. package/dist/components/ConnectAppToApiDialog/index.js.map +1 -1
  69. package/dist/components/CreateApiServerDialog/CreateApiServerDialog.d.ts +8 -1
  70. package/dist/components/CreateApiServerDialog/CreateApiServerDialog.js +13 -117
  71. package/dist/components/CreateApiServerDialog/CreateApiServerDialog.js.map +1 -1
  72. package/dist/components/CreateApiServerDialog/CreateApiServerDialogOpenDispatchContext.d.ts +2 -0
  73. package/dist/components/CreateApiServerDialog/CreateApiServerDialogOpenDispatchContext.js +8 -0
  74. package/dist/components/CreateApiServerDialog/CreateApiServerDialogOpenDispatchContext.js.map +1 -0
  75. package/dist/components/CreateApiServerDialog/CreateApiServerForm.d.ts +11 -0
  76. package/dist/components/CreateApiServerDialog/CreateApiServerForm.js +86 -0
  77. package/dist/components/CreateApiServerDialog/CreateApiServerForm.js.map +1 -0
  78. package/dist/components/CreateApiServerDialog/index.d.ts +3 -2
  79. package/dist/components/CreateApiServerDialog/index.js +2 -1
  80. package/dist/components/CreateApiServerDialog/index.js.map +1 -1
  81. package/dist/components/CreateAppDialog/CreateAppDialog.d.ts +9 -2
  82. package/dist/components/CreateAppDialog/CreateAppDialog.js +11 -138
  83. package/dist/components/CreateAppDialog/CreateAppDialog.js.map +1 -1
  84. package/dist/components/CreateAppDialog/CreateAppDialogOpenDispatchContext.d.ts +2 -0
  85. package/dist/components/CreateAppDialog/CreateAppDialogOpenDispatchContext.js +8 -0
  86. package/dist/components/CreateAppDialog/CreateAppDialogOpenDispatchContext.js.map +1 -0
  87. package/dist/components/CreateAppDialog/CreateAppForm.d.ts +10 -0
  88. package/dist/components/CreateAppDialog/CreateAppForm.js +119 -0
  89. package/dist/components/CreateAppDialog/CreateAppForm.js.map +1 -0
  90. package/dist/components/CreateAppDialog/index.d.ts +3 -2
  91. package/dist/components/CreateAppDialog/index.js +2 -1
  92. package/dist/components/CreateAppDialog/index.js.map +1 -1
  93. package/dist/components/CreateAppDomainDialog/CreateAppDomainDialog.js +43 -71
  94. package/dist/components/CreateAppDomainDialog/CreateAppDomainDialog.js.map +1 -1
  95. package/dist/components/CreateInviteCodeDialog/CreateInviteCodeDialog.d.ts +10 -2
  96. package/dist/components/CreateInviteCodeDialog/CreateInviteCodeDialog.js +11 -121
  97. package/dist/components/CreateInviteCodeDialog/CreateInviteCodeDialog.js.map +1 -1
  98. package/dist/components/CreateInviteCodeDialog/CreateInviteCodeDialogDispatchContext.d.ts +2 -0
  99. package/dist/components/CreateInviteCodeDialog/CreateInviteCodeDialogDispatchContext.js +8 -0
  100. package/dist/components/CreateInviteCodeDialog/CreateInviteCodeDialogDispatchContext.js.map +1 -0
  101. package/dist/components/CreateInviteCodeDialog/CreateInviteCodeForm.d.ts +6 -0
  102. package/dist/components/CreateInviteCodeDialog/CreateInviteCodeForm.js +113 -0
  103. package/dist/components/CreateInviteCodeDialog/CreateInviteCodeForm.js.map +1 -0
  104. package/dist/components/CreateInviteCodeDialog/index.d.ts +3 -1
  105. package/dist/components/CreateInviteCodeDialog/index.js +2 -1
  106. package/dist/components/CreateInviteCodeDialog/index.js.map +1 -1
  107. package/dist/components/CreateOrganizationDialog/CreateOrganizationDialog.d.ts +10 -6
  108. package/dist/components/CreateOrganizationDialog/CreateOrganizationDialog.js +12 -113
  109. package/dist/components/CreateOrganizationDialog/CreateOrganizationDialog.js.map +1 -1
  110. package/dist/components/CreateOrganizationDialog/CreateOrganizationDialogDispatchContext.d.ts +2 -0
  111. package/dist/components/CreateOrganizationDialog/CreateOrganizationDialogDispatchContext.js +8 -0
  112. package/dist/components/CreateOrganizationDialog/CreateOrganizationDialogDispatchContext.js.map +1 -0
  113. package/dist/components/CreateOrganizationDialog/CreateOrganizationForm.d.ts +6 -0
  114. package/dist/components/CreateOrganizationDialog/CreateOrganizationForm.js +113 -0
  115. package/dist/components/CreateOrganizationDialog/CreateOrganizationForm.js.map +1 -0
  116. package/dist/components/CreateOrganizationDialog/index.d.ts +3 -2
  117. package/dist/components/CreateOrganizationDialog/index.js +2 -1
  118. package/dist/components/CreateOrganizationDialog/index.js.map +1 -1
  119. package/dist/components/InviteCodesCard/InviteCodesCard.d.ts +2 -2
  120. package/dist/components/InviteCodesCard/InviteCodesCard.js +4 -65
  121. package/dist/components/InviteCodesCard/InviteCodesCard.js.map +1 -1
  122. package/dist/components/InviteCodesTable/InviteCodesTable.d.ts +5 -5
  123. package/dist/components/InviteCodesTable/InviteCodesTable.js +18 -7
  124. package/dist/components/InviteCodesTable/InviteCodesTable.js.map +1 -1
  125. package/dist/components/InviteCodesTable/columns.d.ts +1 -1
  126. package/dist/components/InviteCodesTable/columns.js +13 -10
  127. package/dist/components/InviteCodesTable/columns.js.map +1 -1
  128. package/dist/components/InviteCodesTable/index.d.ts +2 -0
  129. package/dist/components/InviteCodesTable/index.js +1 -0
  130. package/dist/components/InviteCodesTable/index.js.map +1 -1
  131. package/dist/components/InviteCodesTable/useAllInviteCodes.d.ts +10 -0
  132. package/dist/components/InviteCodesTable/useAllInviteCodes.js +56 -0
  133. package/dist/components/InviteCodesTable/useAllInviteCodes.js.map +1 -0
  134. package/dist/components/InviteMemberDialog/InviteMemberDialog.d.ts +16 -0
  135. package/dist/components/InviteMemberDialog/InviteMemberDialog.js +86 -0
  136. package/dist/components/InviteMemberDialog/InviteMemberDialog.js.map +1 -0
  137. package/dist/components/InviteMemberDialog/InviteMemberDialogDispatchContext.d.ts +2 -0
  138. package/dist/components/InviteMemberDialog/InviteMemberDialogDispatchContext.js +8 -0
  139. package/dist/components/InviteMemberDialog/InviteMemberDialogDispatchContext.js.map +1 -0
  140. package/dist/components/InviteMemberDialog/index.d.ts +3 -0
  141. package/dist/components/InviteMemberDialog/index.js +3 -0
  142. package/dist/components/InviteMemberDialog/index.js.map +1 -0
  143. package/dist/components/OrganizationMembersCard/OrganizationMembersCard.d.ts +3 -1
  144. package/dist/components/OrganizationMembersCard/OrganizationMembersCard.js +4 -58
  145. package/dist/components/OrganizationMembersCard/OrganizationMembersCard.js.map +1 -1
  146. package/dist/components/OrganizationMembersTable/OrganizationMembersTable.d.ts +4 -3
  147. package/dist/components/OrganizationMembersTable/OrganizationMembersTable.js +40 -6
  148. package/dist/components/OrganizationMembersTable/OrganizationMembersTable.js.map +1 -1
  149. package/dist/components/OrganizationMembersTable/columns.d.ts +1 -1
  150. package/dist/components/OrganizationMembersTable/columns.js +71 -16
  151. package/dist/components/OrganizationMembersTable/columns.js.map +1 -1
  152. package/dist/components/OrganizationSettingsCard/DeleteOrganizationDialog.d.ts +10 -0
  153. package/dist/components/OrganizationSettingsCard/DeleteOrganizationDialog.js +54 -0
  154. package/dist/components/OrganizationSettingsCard/DeleteOrganizationDialog.js.map +1 -0
  155. package/dist/components/OrganizationSettingsCard/OrganizationSettingsCard.d.ts +10 -0
  156. package/dist/components/OrganizationSettingsCard/OrganizationSettingsCard.js +20 -0
  157. package/dist/components/OrganizationSettingsCard/OrganizationSettingsCard.js.map +1 -0
  158. package/dist/components/OrganizationSettingsCard/index.d.ts +4 -0
  159. package/dist/components/OrganizationSettingsCard/index.js +3 -0
  160. package/dist/components/OrganizationSettingsCard/index.js.map +1 -0
  161. package/dist/components/OrganizationsCard/OrganizationsCard.d.ts +2 -2
  162. package/dist/components/OrganizationsCard/OrganizationsCard.js +4 -65
  163. package/dist/components/OrganizationsCard/OrganizationsCard.js.map +1 -1
  164. package/dist/components/OrganizationsTable/OrganizationsTable.d.ts +2 -3
  165. package/dist/components/OrganizationsTable/OrganizationsTable.js +12 -8
  166. package/dist/components/OrganizationsTable/OrganizationsTable.js.map +1 -1
  167. package/dist/components/OrganizationsTable/columns.d.ts +1 -1
  168. package/dist/components/OrganizationsTable/columns.js +14 -10
  169. package/dist/components/OrganizationsTable/columns.js.map +1 -1
  170. package/dist/components/OrganizationsTable/index.d.ts +3 -1
  171. package/dist/components/OrganizationsTable/index.js +2 -1
  172. package/dist/components/OrganizationsTable/index.js.map +1 -1
  173. package/dist/components/OrganizationsTable/useAllOrganizationsList.d.ts +8 -0
  174. package/dist/components/OrganizationsTable/useAllOrganizationsList.js +58 -0
  175. package/dist/components/OrganizationsTable/useAllOrganizationsList.js.map +1 -0
  176. package/dist/components/PendingInvitationsCard/PendingInvitationsCard.d.ts +10 -0
  177. package/dist/components/PendingInvitationsCard/PendingInvitationsCard.js +13 -0
  178. package/dist/components/PendingInvitationsCard/PendingInvitationsCard.js.map +1 -0
  179. package/dist/components/PendingInvitationsCard/index.d.ts +2 -0
  180. package/dist/components/PendingInvitationsCard/index.js +2 -0
  181. package/dist/components/PendingInvitationsCard/index.js.map +1 -0
  182. package/dist/components/PendingInvitationsTable/PendingInvitationsTable.d.ts +7 -0
  183. package/dist/components/PendingInvitationsTable/PendingInvitationsTable.js +30 -0
  184. package/dist/components/PendingInvitationsTable/PendingInvitationsTable.js.map +1 -0
  185. package/dist/components/PendingInvitationsTable/columns.d.ts +3 -0
  186. package/dist/components/PendingInvitationsTable/columns.js +100 -0
  187. package/dist/components/PendingInvitationsTable/columns.js.map +1 -0
  188. package/dist/components/PendingInvitationsTable/index.d.ts +4 -0
  189. package/dist/components/PendingInvitationsTable/index.js +3 -0
  190. package/dist/components/PendingInvitationsTable/index.js.map +1 -0
  191. package/dist/components/PendingInvitationsTable/usePendingInvitations.d.ts +10 -0
  192. package/dist/components/PendingInvitationsTable/usePendingInvitations.js +48 -0
  193. package/dist/components/PendingInvitationsTable/usePendingInvitations.js.map +1 -0
  194. package/dist/components/SentInvitationsCard/SentInvitationsCard.d.ts +11 -0
  195. package/dist/components/SentInvitationsCard/SentInvitationsCard.js +13 -0
  196. package/dist/components/SentInvitationsCard/SentInvitationsCard.js.map +1 -0
  197. package/dist/components/SentInvitationsCard/index.d.ts +2 -0
  198. package/dist/components/SentInvitationsCard/index.js +2 -0
  199. package/dist/components/SentInvitationsCard/index.js.map +1 -0
  200. package/dist/components/SentInvitationsTable/SentInvitationsTable.d.ts +8 -0
  201. package/dist/components/SentInvitationsTable/SentInvitationsTable.js +32 -0
  202. package/dist/components/SentInvitationsTable/SentInvitationsTable.js.map +1 -0
  203. package/dist/components/SentInvitationsTable/columns.d.ts +3 -0
  204. package/dist/components/SentInvitationsTable/columns.js +130 -0
  205. package/dist/components/SentInvitationsTable/columns.js.map +1 -0
  206. package/dist/components/SentInvitationsTable/index.d.ts +4 -0
  207. package/dist/components/SentInvitationsTable/index.js +3 -0
  208. package/dist/components/SentInvitationsTable/index.js.map +1 -0
  209. package/dist/components/SentInvitationsTable/useSentInvitations.d.ts +12 -0
  210. package/dist/components/SentInvitationsTable/useSentInvitations.js +52 -0
  211. package/dist/components/SentInvitationsTable/useSentInvitations.js.map +1 -0
  212. package/dist/components/UsersCard/UsersCard.js +1 -22
  213. package/dist/components/UsersCard/UsersCard.js.map +1 -1
  214. package/dist/components/UsersTable/columns.d.ts +1 -1
  215. package/dist/components/UsersTable/columns.js +29 -21
  216. package/dist/components/UsersTable/columns.js.map +1 -1
  217. package/dist/components/index.d.ts +21 -5
  218. package/dist/components/index.js +10 -2
  219. package/dist/components/index.js.map +1 -1
  220. package/package.json +9 -9
@@ -15,3 +15,4 @@ export interface AccountDetailsCardProps {
15
15
  organizations?: readonly OrganizationDefinition[];
16
16
  }
17
17
  export declare function AccountDetailsCard(props: AccountDetailsCardProps): ReactElement;
18
+ export default AccountDetailsCard;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, KeyValueWithSkeleton, cn, } from "@schemavaults/ui";
4
4
  import SignOutButton from "../SignOutButton";
5
5
  import ViewFullUserProfileButton from "./view_full_user_profile";
@@ -8,10 +8,11 @@ import { getHardcodedClientWebAppDomain, SCHEMAVAULTS_AUTH_APP_DEFINITION, } fro
8
8
  import { Building2 } from "lucide-react";
9
9
  export function AccountDetailsCard(props) {
10
10
  const currentUser = props.user;
11
+ const Link = props.Link;
11
12
  const auth_server_uri = getHardcodedClientWebAppDomain(SCHEMAVAULTS_AUTH_APP_DEFINITION.app_id, props.appEnvironment);
12
13
  const cardClassName = cn("w-full", props.cardClassName);
13
14
  const showLinkToAuthServerAccountPage = !props.isAuthServerAccountPage;
14
- return (_jsxs(Card, { className: cardClassName, children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Account Details" }), _jsx(CardDescription, { children: "View and manage your SchemaVaults account." })] }), _jsxs(CardContent, { children: [_jsxs("div", { className: "flex flex-col items-start justify-start", children: [_jsx(KeyValueWithSkeleton, { label: "User ID", value: currentUser?.uid }), _jsx(KeyValueWithSkeleton, { label: "Email", value: currentUser?.email })] }), props.isAuthServerAccountPage && (_jsxs("div", { className: "mt-6", children: [_jsx("h3", { className: "text-sm font-medium mb-3", children: "Organizations" }), props.organizations && props.organizations.length > 0 ? (_jsx("div", { className: "flex flex-wrap gap-2", children: props.organizations.map((org) => (_jsx(props.Link, { href: `/org/${org.organization_id}`, children: _jsxs(Button, { variant: "outline", size: "sm", className: "gap-2", children: [_jsx(Building2, { className: "h-4 w-4" }), org.name] }) }, org.organization_id))) })) : (_jsx("p", { className: "text-sm text-muted-foreground", children: "No organizations" }))] }))] }), _jsx(CardFooter, { children: _jsxs("div", { className: "flex flex-row items-start justify-start flex-wrap gap-2", children: [_jsx(SignOutButton, { Link: props.Link }), showLinkToAuthServerAccountPage && (_jsx(ViewFullUserProfileButton, { navigate: async () => {
15
+ return (_jsxs(Card, { className: cardClassName, children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Account Details" }), _jsx(CardDescription, { children: "View and manage your SchemaVaults account." })] }), _jsx(CardContent, { children: _jsxs("div", { className: "flex flex-col items-start justify-start gap-2", children: [_jsx(KeyValueWithSkeleton, { label: "User ID", value: currentUser?.uid }), _jsx(KeyValueWithSkeleton, { label: "Email", value: currentUser?.email }), props.isAuthServerAccountPage && (_jsxs("div", { className: "flex flex-row items-center justify-start gap-2 flex-wrap", children: [_jsx("h3", { className: "text-lg font-bold", children: "Organizations:" }), props.organizations && props.organizations.length > 0 ? (_jsx(_Fragment, { children: props.organizations.map((org) => (_jsx(Link, { href: `/org/${org.organization_id}`, children: _jsxs(Button, { variant: "outline", size: "sm", className: "flex flex-row flex-nowrap gap-2", children: [_jsx(Building2, { className: "h-4 w-4" }), org.name] }) }, org.organization_id))) })) : (_jsx("p", { className: "text-sm text-muted-foreground", children: "No organizations" }))] }))] }) }), _jsx(CardFooter, { children: _jsxs("div", { className: "flex flex-row items-start justify-start flex-wrap gap-2", children: [_jsx(SignOutButton, { Link: props.Link }), showLinkToAuthServerAccountPage && (_jsx(ViewFullUserProfileButton, { navigate: async () => {
15
16
  const accountUrl = `${auth_server_uri}/account`;
16
17
  await props.redirect(accountUrl);
17
18
  } })), _jsx(ViewAdminDashboardButton, { navigate: async () => {
@@ -19,4 +20,5 @@ export function AccountDetailsCard(props) {
19
20
  await props.redirect(accountUrl);
20
21
  }, admin: props.isAdmin })] }) })] }));
21
22
  }
23
+ export default AccountDetailsCard;
22
24
  //# sourceMappingURL=account_card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"account_card.js","sourceRoot":"","sources":["../../../src/components/AccountCard/account_card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,EAAE,GACH,MAAM,kBAAkB,CAAC;AAG1B,OAAO,aAA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AI,IAA2B,IAAI,EAAE,QAAQ,GAAG,CAAC,eAAe,EAAE,YACvE,MAAC,MAAM,IAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,aACnD,KAAC,SAAS,IAAC,SAAS,EAAC,SAAS,GAAG,EAChC,GAAG,CAAC,IAAI,IACF,IAJM,GAAG,CAAC,eAAe,CAKvB,CACd,CAAC,GACE,CACP,CAAC,CAAC,CAAC,CACF,YAAG,SAAS,EAAC,+BAA+B,iCAAqB,CAClE,IACG,CACP,IACW,EACd,KAAC,UAAU,cACT,eAAK,SAAS,EAAC,yDAAyD,aACtE,KAAC,aAAa,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,GAAI,EAClC,+BAA+B,IAAI,CAClC,KAAC,yBAAyB,IACxB,QAAQ,EAAE,KAAK,IAAI,EAAE;gCACnB,MAAM,UAAU,GACd,GAAG,eAAe,UAAoC,CAAC;gCACzD,MAAM,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;4BACnC,CAAC,GACD,CACH,EACD,KAAC,wBAAwB,IACvB,QAAQ,EAAE,KAAK,IAAI,EAAE;gCACnB,MAAM,UAAU,GAAG,GAAG,eAAe,QAAiB,CAAC;gCACvD,MAAM,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;4BACnC,CAAC,EACD,KAAK,EAAE,KAAK,CAAC,OAAO,GACpB,IACE,GACK,IACR,CACR,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"account_card.js","sourceRoot":"","sources":["../../../src/components/AccountCard/account_card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,EAAE,GACH,MAAM,kBAAkB,CAAC;AAG1B,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,yBAAyB,MAAM,0BA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e,EAAE,YAEnC,MAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,IAAI,EACT,SAAS,EAAC,iCAAiC,aAE3C,KAAC,SAAS,IAAC,SAAS,EAAC,SAAS,GAAG,EAChC,GAAG,CAAC,IAAI,IACF,IAVJ,GAAG,CAAC,eAAe,CAWnB,CACR,CAAC,GACD,CACJ,CAAC,CAAC,CAAC,CACF,YAAG,SAAS,EAAC,+BAA+B,iCAExC,CACL,IACG,CACP,IACG,GACM,EACd,KAAC,UAAU,cACT,eAAK,SAAS,EAAC,yDAAyD,aACtE,KAAC,aAAa,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,GAAI,EAClC,+BAA+B,IAAI,CAClC,KAAC,yBAAyB,IACxB,QAAQ,EAAE,KAAK,IAAI,EAAE;gCACnB,MAAM,UAAU,GACd,GAAG,eAAe,UAAoC,CAAC;gCACzD,MAAM,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;4BACnC,CAAC,GACD,CACH,EACD,KAAC,wBAAwB,IACvB,QAAQ,EAAE,KAAK,IAAI,EAAE;gCACnB,MAAM,UAAU,GAAG,GAAG,eAAe,QAAiB,CAAC;gCACvD,MAAM,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;4BACnC,CAAC,EACD,KAAK,EAAE,KAAK,CAAC,OAAO,GACpB,IACE,GACK,IACR,CACR,CAAC;AACJ,CAAC;AAED,eAAe,kBAAkB,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './account_card';
2
- export type * from './account_card';
1
+ export { AccountDetailsCard, AccountDetailsCard as default, AccountDetailsCard as AccountCard, } from "./account_card";
2
+ export type * from "./account_card";
@@ -1,2 +1,2 @@
1
- export * from './account_card';
1
+ export { AccountDetailsCard, AccountDetailsCard as default, AccountDetailsCard as AccountCard, } from "./account_card";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AccountCard/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AccountCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,IAAI,OAAO,EAC7B,kBAAkB,IAAI,WAAW,GAClC,MAAM,gBAAgB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ReactElement } from "react";
1
+ import { type ReactElement } from "react";
2
2
  import type { ListApiServersQueryType } from "@schemavaults/app-definitions";
3
3
  import { type PreloadedApiServersTableData } from "../ApiServersTable";
4
4
  export interface ApiServersCardProps {
@@ -8,5 +8,8 @@ export interface ApiServersCardProps {
8
8
  queryType: ListApiServersQueryType;
9
9
  organization_id?: string;
10
10
  preloaded?: PreloadedApiServersTableData;
11
+ uuid: () => string;
12
+ showConnectAppToApi?: boolean;
11
13
  }
12
14
  export declare function ApiServersCard(props: ApiServersCardProps): ReactElement;
15
+ export default ApiServersCard;
@@ -1,12 +1,21 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
3
4
  import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, } from "@schemavaults/ui";
4
- import { ApiServersTable } from "../ApiServersTable";
5
+ import { ApiServersTable, clearUseApiServersCache, } from "../ApiServersTable";
6
+ import CreateApiServerDialog, { CreateApiServerDialogOpenDispatchContext, } from "../CreateApiServerDialog";
7
+ import { SCHEMAVAULTS_ORGANIZATION_ID } from "@schemavaults/auth-common";
8
+ import ConnectAppToApiDialog, { ConnectAppToApiDialogOpenDispatchContext, } from "../ConnectAppToApiDialog";
5
9
  export function ApiServersCard(props) {
6
10
  const cardTitle = props.cardTitle ?? "API Servers";
7
11
  const cardDescription = props.cardDescription ??
8
12
  "View and manage backend API servers accessible from client applications.";
9
13
  const cardClassName = cn("w-full", props.cardClassName);
10
- return (_jsxs(Card, { className: cardClassName, children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: cardTitle }), _jsx(CardDescription, { children: cardDescription })] }), _jsx(CardContent, { children: _jsx(ApiServersTable, { queryType: props.queryType, organization_id: props.organization_id, preloaded: props.preloaded }) }), _jsx(CardFooter, { children: _jsx("div", { className: "flex flex-row items-start justify-start gap-2" }) })] }));
14
+ const [createApiServerDialogOpen, setCreateApiServerDialogOpen] = useState(false);
15
+ const [connectAppToApiDialogOpen, setConnectAppToApiDialogOpen] = useState(false);
16
+ return (_jsx(CreateApiServerDialogOpenDispatchContext.Provider, { value: setCreateApiServerDialogOpen, children: _jsxs(ConnectAppToApiDialogOpenDispatchContext.Provider, { value: setConnectAppToApiDialogOpen, children: [_jsxs(Card, { className: cardClassName, children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: cardTitle }), _jsx(CardDescription, { children: cardDescription })] }), _jsx(CardContent, { children: _jsx(ApiServersTable, { queryType: props.queryType, organization_id: props.organization_id, preloaded: props.preloaded, showConnectAppToApi: props.showConnectAppToApi }) }), _jsx(CardFooter, { children: _jsx("div", { className: "flex flex-row items-start justify-start gap-2" }) })] }), _jsx(CreateApiServerDialog, { clearApiServersCache: clearUseApiServersCache, owner_organization_id: props.queryType === "all"
17
+ ? SCHEMAVAULTS_ORGANIZATION_ID
18
+ : props.organization_id, open: createApiServerDialogOpen, onOpenChange: setCreateApiServerDialogOpen, uuid: props.uuid }), (props.queryType === "all" || props.showConnectAppToApi) && (_jsx(ConnectAppToApiDialog, { open: connectAppToApiDialogOpen, onOpenChange: setConnectAppToApiDialogOpen }))] }) }));
11
19
  }
20
+ export default ApiServersCard;
12
21
  //# sourceMappingURL=api_servers_card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"api_servers_card.js","sourceRoot":"","sources":["../../../src/components/ApiServersCard/api_servers_card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,EAAE,GACH,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAqC,MAAM,8BAA8B,CAAC;AAWlG,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,aAAa,CAAC;IACnD,MAAM,eAAe,GACnB,KAAK,CAAC,eAAe;QACrB,0EAA0E,CAAC;IAE7E,MAAM,aAAa,GAAW,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAEhE,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,EAAE,aAAa,aAC5B,MAAC,UAAU,eACT,KAAC,SAAS,cAAE,SAAS,GAAa,EAClC,KAAC,eAAe,cAAE,eAAe,GAAmB,IACzC,EACb,KAAC,WAAW,cACV,KAAC,eAAe,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,CAAC,eAAe,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,GACvG,EACd,KAAC,UAAU,cACT,cAAK,SAAS,EAAC,+CAA+C,GAAO,GAC1D,IACR,CACR,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"api_servers_card.js","sourceRoot":"","sources":["../../../src/components/ApiServersCard/api_servers_card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAqB,MAAM,OAAO,CAAC;AACpD,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,EAAE,GACH,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,eAAe,EACf,uBAAuB,GAExB,MAAM,8BAA8B,CAAC;AACtC,OAAO,qBAAqB,EAAE,EAC5B,wCAAwC,GACzC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,qBAAqB,EAAE,EAC5B,wCAAwC,GACz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GAChB,EACD,CAAC,KAAK,CAAC,SAAS,KAAK,KAAK,IAAI,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAC3D,KAAC,qBAAqB,IACpB,IAAI,EAAE,yBAAyB,EAC/B,YAAY,EAAE,4BAA4B,GAC1C,CACH,IACiD,GACF,CACrD,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './api_servers_card';
2
- export type * from './api_servers_card';
1
+ export { ApiServersCard, ApiServersCard as default } from "./api_servers_card";
2
+ export type * from "./api_servers_card";
@@ -1,2 +1,2 @@
1
- export * from './api_servers_card';
1
+ export { ApiServersCard, ApiServersCard as default } from "./api_servers_card";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ApiServersCard/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ApiServersCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ReactElement } from "react";
2
+ import { type SchemaVaultsApiServerDefinition } from "@schemavaults/app-definitions";
3
+ export interface ApiServerRowActionsProps {
4
+ api: SchemaVaultsApiServerDefinition;
5
+ }
6
+ export declare function ApiServerRowActions({ api, }: ApiServerRowActionsProps): ReactElement;
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useState, useContext } from "react";
4
+ import { cn, useToast } from "@schemavaults/ui";
5
+ import { Button } from "@schemavaults/ui";
6
+ import { ClipboardCopy, Key, MoreHorizontal, PlugZap } from "lucide-react";
7
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "@schemavaults/ui";
8
+ import { SCHEMAVAULTS_AUTH_SERVER, } from "@schemavaults/app-definitions";
9
+ import Link from "next/link";
10
+ import { ConnectAppToApiDialog } from "../ConnectAppToApiDialog";
11
+ import { ApiServersTableConfigContext } from "./ApiServersTableConfigContext";
12
+ const menuItemClassname = cn("flex flex-row flex-nowrap gap-2 items-center justify-start");
13
+ const menuItemIconClassname = cn("h-4 w-4");
14
+ export function ApiServerRowActions({ api, }) {
15
+ const api_server_id = api.api_server_id;
16
+ const { toast } = useToast();
17
+ const [connectDialogOpen, setConnectDialogOpen] = useState(false);
18
+ const { showConnectAppToApi } = useContext(ApiServersTableConfigContext);
19
+ return (_jsxs(_Fragment, { children: [_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", className: "h-8 w-8 p-0", children: [_jsx("span", { className: "sr-only", children: "Open menu" }), _jsx(MoreHorizontal, { className: "h-4 w-4" })] }) }), _jsxs(DropdownMenuContent, { align: "end", children: [_jsx(DropdownMenuLabel, { children: "Actions" }), _jsxs(DropdownMenuItem, { onClick: async (e) => {
20
+ e.preventDefault();
21
+ try {
22
+ if (!window.isSecureContext) {
23
+ throw new Error("Writing to clipboard is only allowed in secure contexts!");
24
+ }
25
+ await navigator.clipboard.writeText(api_server_id);
26
+ }
27
+ catch (e) {
28
+ toast({
29
+ variant: "destructive",
30
+ title: "Failed to copy API server ID to clipboard",
31
+ description: e instanceof Error
32
+ ? e.message
33
+ : "An unknown error has occurred!",
34
+ });
35
+ return;
36
+ }
37
+ toast({
38
+ title: "Successfully copied API server ID to clipboard",
39
+ description: `You can now paste: '${api_server_id}'`,
40
+ });
41
+ return;
42
+ }, className: menuItemClassname, children: [_jsx(ClipboardCopy, { className: menuItemIconClassname }), " Copy API Server ID"] }), api_server_id !== SCHEMAVAULTS_AUTH_SERVER.api_server_id && (_jsx(Link, { href: `/apis/${api_server_id}/jwks-access-keys`, className: "hover:cursor-pointer", children: _jsxs(DropdownMenuItem, { className: menuItemClassname, children: [_jsx(Key, { className: menuItemIconClassname }), " Manage Access Keys"] }) })), showConnectAppToApi && (_jsxs(_Fragment, { children: [_jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { onClick: (e) => {
43
+ e.preventDefault();
44
+ setConnectDialogOpen(true);
45
+ }, className: menuItemClassname, children: [_jsx(PlugZap, { className: menuItemIconClassname }), " Connect App to this API"] })] }))] })] }), showConnectAppToApi && (_jsx(ConnectAppToApiDialog, { open: connectDialogOpen, onOpenChange: setConnectDialogOpen, preselectedApiServerId: api_server_id }))] }));
46
+ }
47
+ //# sourceMappingURL=ApiServerRowActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiServerRowActions.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/ApiServerRowActions.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,GAGzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,MAAM,iBAAiB,GAAW,EAAE,CAClC,4DAA4D,CAC7D,CAAC;AACF,MAAM,qBAAqB,GAAW,EAAE,CAA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ACJ,KAAK,EAAE,gDAAgD;wCACvD,WAAW,EAAE,uBAAuB,aAAa,GAAG;qCACrD,CAAC,CAAC;oCACH,OAAO;gCACT,CAAC,EACD,SAAS,EAAE,iBAAiB,aAE5B,KAAC,aAAa,IAAC,SAAS,EAAE,qBAAqB,GAAI,2BAElC,EAClB,aAAa,KAAK,wBAAwB,CAAC,aAAa,IAAI,CAC3D,KAAC,IAAI,IACH,IAAI,EAAE,SAAS,aAAa,mBAAmB,EAC/C,SAAS,EAAC,sBAAsB,YAEhC,MAAC,gBAAgB,IAAC,SAAS,EAAE,iBAAiB,aAC5C,KAAC,GAAG,IAAC,SAAS,EAAE,qBAAqB,GAAI,2BACxB,GACd,CACR,EACA,mBAAmB,IAAI,CACtB,8BACE,KAAC,qBAAqB,KAAG,EACzB,MAAC,gBAAgB,IACf,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;4CACb,CAAC,CAAC,cAAc,EAAE,CAAC;4CACnB,oBAAoB,CAAC,IAAI,CAAC,CAAC;wCAC7B,CAAC,EACD,SAAS,EAAE,iBAAiB,aAE5B,KAAC,OAAO,IAAC,SAAS,EAAE,qBAAqB,GAAI,gCAE5B,IAClB,CACJ,IACmB,IACT,EACd,mBAAmB,IAAI,CACtB,KAAC,qBAAqB,IACpB,IAAI,EAAE,iBAAiB,EACvB,YAAY,EAAE,oBAAoB,EAClC,sBAAsB,EAAE,aAAa,GACrC,CACH,IACA,CACJ,CAAC;AACJ,CAAC"}
@@ -1,10 +1,11 @@
1
- import type { ReactElement } from "react";
1
+ import { type ReactElement } from "react";
2
2
  import type { ListApiServersQueryType } from "@schemavaults/app-definitions";
3
3
  import type { PreloadedApiServersTableData } from "./preloaded_api_servers_table_data";
4
4
  export interface ApiServersDatatableProps {
5
5
  queryType: ListApiServersQueryType;
6
6
  organization_id?: string;
7
7
  preloaded?: PreloadedApiServersTableData | undefined;
8
+ showConnectAppToApi?: boolean;
8
9
  }
9
- export declare function ApiServersTable({ queryType, organization_id, preloaded, }: ApiServersDatatableProps): ReactElement;
10
+ export declare function ApiServersTable({ queryType, organization_id, preloaded, showConnectAppToApi, }: ApiServersDatatableProps): ReactElement;
10
11
  export default ApiServersTable;
@@ -1,41 +1,54 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useToast } from "@schemavaults/ui";
3
+ import { useContext, useMemo } from "react";
4
4
  import { Datatable } from "@schemavaults/ui";
5
5
  import { columns } from "./columns";
6
- import { SCHEMAVAULTS_ORGANIZATION_ID } from "@schemavaults/auth-common";
7
6
  import { Loader2 } from "lucide-react";
8
- import { clearUseApiServersCache, useApiServersList, } from "./useApiServersList";
9
- import { CreateApiServerDialog } from "../CreateApiServerDialog";
10
- import { ConnectAppToApiDialog } from "../ConnectAppToApiDialog";
11
- export function ApiServersTable({ queryType, organization_id, preloaded, }) {
12
- const { toast } = useToast();
7
+ import { useApiServersList } from "./useApiServersList";
8
+ import { CreateApiServerDialogOpenDispatchContext, CreateApiServerDialogTrigger, } from "../CreateApiServerDialog";
9
+ import { ConnectAppToApiDialogOpenDispatchContext, ConnectAppToApiDialogTrigger, } from "../ConnectAppToApiDialog";
10
+ import { ApiServersTableConfigContext } from "./ApiServersTableConfigContext";
11
+ function ApiServersTableHeaderButtons({ queryType, showConnectAppToApi, }) {
12
+ const onOpenChangeCreateApi = useContext(CreateApiServerDialogOpenDispatchContext);
13
+ const onOpenChangeConnectAppToApi = useContext(ConnectAppToApiDialogOpenDispatchContext);
14
+ return (_jsxs(_Fragment, { children: [(queryType === "all" || queryType === "org") && (_jsx(CreateApiServerDialogTrigger, { onOpenChange: onOpenChangeCreateApi })), (queryType === "all" || showConnectAppToApi) && (_jsx(ConnectAppToApiDialogTrigger, { onOpenChange: onOpenChangeConnectAppToApi }))] }));
15
+ }
16
+ export function ApiServersTable({ queryType, organization_id, preloaded, showConnectAppToApi, }) {
13
17
  const apis = useApiServersList({
14
- toast,
15
18
  queryType,
16
19
  initialData: preloaded ? preloaded.api_servers : undefined,
17
20
  organization_id,
18
21
  });
19
22
  const { isLoading, data } = apis;
23
+ const HeaderButtons = useMemo(() => {
24
+ return function ApiServersTableHeaderButtonsWithQueryType() {
25
+ return _jsx(ApiServersTableHeaderButtons, { queryType: queryType, showConnectAppToApi: showConnectAppToApi });
26
+ };
27
+ }, [queryType, showConnectAppToApi]);
28
+ // Assert that 'owner_organization_id' field is present from server
29
+ useMemo(() => {
30
+ if (apis.data && Array.isArray(apis.data)) {
31
+ if (!apis.data.every((api_server_definition) => api_server_definition.owner_organization_id)) {
32
+ throw new TypeError("Received API server definition that is missing 'owner_organization_id' field!");
33
+ }
34
+ }
35
+ }, [apis.data]);
36
+ const contextValue = useMemo(() => ({ showConnectAppToApi: showConnectAppToApi ?? false }), [showConnectAppToApi]);
20
37
  if (!data && isLoading) {
21
38
  return (_jsx("div", { className: "min-h-48 w-full flex items-center justify-center", children: _jsx(Loader2, { className: "h-12 w-12 animate-spin" }) }));
22
39
  }
23
- return (_jsx(Datatable, { data: [...(data ? (data.length > 0 ? data : []) : [])], columns: columns, initialVisibleColumns: {
24
- actions: true,
25
- select: true,
26
- api_server_id: false,
27
- api_server_name: true,
28
- api_server_description: true,
29
- owner_organization_id: false,
30
- }, HeaderButtons: () => {
31
- return (_jsxs(_Fragment, { children: [(queryType === "all" || queryType === "org") && (_jsx(CreateApiServerDialog, { clearApiServersCache: clearUseApiServersCache, owner_organization_id: queryType === "all"
32
- ? SCHEMAVAULTS_ORGANIZATION_ID
33
- : organization_id })), queryType === "all" && _jsx(ConnectAppToApiDialog, {})] }));
34
- }, datatypeLabel: "Server", searchColumn: [
35
- "api_server_id",
36
- "api_server_name",
37
- "api_server_description",
38
- ] }));
40
+ return (_jsx(ApiServersTableConfigContext.Provider, { value: contextValue, children: _jsx(Datatable, { data: [...(data ? (data.length > 0 ? data : []) : [])], columns: columns, initialVisibleColumns: {
41
+ actions: true,
42
+ select: true,
43
+ api_server_id: false,
44
+ api_server_name: true,
45
+ api_server_description: true,
46
+ owner_organization_id: false,
47
+ }, HeaderButtons: HeaderButtons, datatypeLabel: "Server", searchColumn: [
48
+ "api_server_id",
49
+ "api_server_name",
50
+ "api_server_description",
51
+ ] }) }));
39
52
  }
40
53
  export default ApiServersTable;
41
54
  //# sourceMappingURL=ApiServersTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiServersTable.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/ApiServersTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAIb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAS3E,MAAM,UAAU,eAAe,CAAC,EAC9B,SAAS,EACT,eAAe,EACf,SAAS,GACgB;IACzB,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,IAAI,GACR,iBAAiB,CAAC;QAChB,KAAK;QACL,SAAS;QACT,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;QAC1D,eAAe;KAChB,CAAC,CAAC;IACL,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAEjC,IAAI,CAAC,IAAI,IAAI,SAAS,EAAE,CAAC;QACvB,OAAO,CACL,cAAK,SAAS,EAAC,kDAAkD,YAC/D,KAAC,OAAO,IAAC,SAAS,EAAC,wBAAwB,GAAG,GAC1C,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,SAAS,IACR,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EACtD,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE;YACrB,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI;YACZ,aAAa,EAAE,KAAK;YACpB,eAAe,EAAE,IAAI;YACrB,sBAAsB,EAAE,IAAI;YAC5B,qBAAqB,EAAE,KAAK;SAC7B,EACD,aAAa,EAAE,GAAiB,EAAE;YAChC,OAAO,CACL,8BACG,CAAC,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,KAAK,CAAC,IAAI,CAC/C,KAAC,qBAAqB,IACpB,oBAAoB,EAAE,uBAAuB,EAC7C,qBAAqB,EACnB,SAAS,KAAK,KAAK;4BACjB,CAAC,CAAC,4BAA4B;4BAC9B,CAAC,CAAC,eAAe,GAErB,CACH,EACA,SAAS,KAAK,KAAK,IAAI,KAAC,qBAAqB,KAAG,IAChD,CACJ,CAAC;QACJ,CAAC,EACD,aAAa,EAAC,QAAQ,EACtB,YAAY,EAAE;YACZ,eAAe;YACf,iBAAiB;YACjB,wBAAwB;SACzB,GACD,CACH,CAAC;AACJ,CAAC;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ApiServersTable.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/ApiServersTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAW,UAAU,EAAE,OAAO,EAAqB,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WA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ACrB,sBAAsB,EAAE,IAAI;gBAC5B,qBAAqB,EAAE,KAAK;aAC7B,EACD,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAC,QAAQ,EACtB,YAAY,EAAE;gBACZ,eAAe;gBACf,iBAAiB;gBACjB,wBAAwB;aACzB,GACD,GACoC,CACzC,CAAC;AACJ,CAAC;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface ApiServersTableConfig {
2
+ showConnectAppToApi: boolean;
3
+ }
4
+ export declare const ApiServersTableConfigContext: import("react").Context<ApiServersTableConfig>;
@@ -0,0 +1,6 @@
1
+ "use client";
2
+ import { createContext } from "react";
3
+ export const ApiServersTableConfigContext = createContext({
4
+ showConnectAppToApi: false,
5
+ });
6
+ //# sourceMappingURL=ApiServersTableConfigContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiServersTableConfigContext.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/ApiServersTableConfigContext.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAMtC,MAAM,CAAC,MAAM,4BAA4B,GACvC,aAAa,CAAwB;IACnC,mBAAmB,EAAE,KAAK;CAC3B,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { ColumnDef } from "@tanstack/react-table";
2
- import { type SchemaVaultsApiServerDefinition } from "@schemavaults/app-definitions";
1
+ import type { ColumnDef } from "@schemavaults/ui";
2
+ import type { SchemaVaultsApiServerDefinition } from "@schemavaults/app-definitions";
3
3
  export declare const columns: ColumnDef<SchemaVaultsApiServerDefinition>[];
@@ -1,11 +1,7 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Checkbox, cn, useToast } from "@schemavaults/ui";
4
- import { Button } from "@schemavaults/ui";
5
- import { ClipboardCopy, Key, MoreHorizontal } from "lucide-react";
6
- import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger, } from "@schemavaults/ui";
7
- import { SCHEMAVAULTS_AUTH_SERVER, } from "@schemavaults/app-definitions";
8
- import Link from "next/link";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Checkbox } from "@schemavaults/ui";
4
+ import { ApiServerRowActions } from "./ApiServerRowActions";
9
5
  export const columns = [
10
6
  {
11
7
  id: "select",
@@ -37,33 +33,9 @@ export const columns = [
37
33
  },
38
34
  {
39
35
  id: "actions",
40
- cell: function ApiServerRowActionsCell({ row }) {
36
+ cell: ({ row }) => {
41
37
  const api = row.original;
42
- const api_server_id = api.api_server_id;
43
- const { toast } = useToast();
44
- const menuItemClassname = cn("flex flex-row flex-nowrap gap-2 items-center justify-start");
45
- const menuItemIconClassname = cn("h-4 w-4");
46
- return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", className: "h-8 w-8 p-0", children: [_jsx("span", { className: "sr-only", children: "Open menu" }), _jsx(MoreHorizontal, { className: "h-4 w-4" })] }) }), _jsxs(DropdownMenuContent, { align: "end", children: [_jsx(DropdownMenuLabel, { children: "Actions" }), _jsxs(DropdownMenuItem, { onClick: async (e) => {
47
- e.preventDefault();
48
- try {
49
- await navigator.clipboard.writeText(api_server_id);
50
- }
51
- catch (e) {
52
- toast({
53
- variant: "destructive",
54
- title: "Failed to copy API server ID to clipboard",
55
- description: e instanceof Error
56
- ? e.message
57
- : "An unknown error has occurred!",
58
- });
59
- return;
60
- }
61
- toast({
62
- title: "Successfully copied API server ID to clipboard",
63
- description: `You can now paste: '${api_server_id}'`,
64
- });
65
- return;
66
- }, className: menuItemClassname, children: [_jsx(ClipboardCopy, { className: menuItemIconClassname }), " Copy API Server ID"] }), api_server_id !== SCHEMAVAULTS_AUTH_SERVER.api_server_id && (_jsx(Link, { href: `/apis/${api_server_id}/jwks-access-keys`, className: "hover:cursor-pointer", children: _jsxs(DropdownMenuItem, { className: menuItemClassname, children: [_jsx(Key, { className: menuItemIconClassname }), " Manage Access Keys"] }) }))] })] }));
38
+ return _jsx(ApiServerRowActions, { api: api });
67
39
  },
68
40
  },
69
41
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"columns.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/columns.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAKb,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,GAGzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAiD;IACnE;QACE,EAAE,EAAE,QAAQ;QACZ,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACrB,KAAC,QAAQ,IACP,OAAO,EACL,KAAK,CAAC,wBAAwB,EAAE;gBAChC,CAAC,KAAK,CAAC,yBAAyB,EAAE,IAAI,eAAe,CAAC,EAExD,eAAe,EAAE,CAAC,KAAc,EAAE,EAAE,CAClC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC,KAAK,CAAC,gBAE/B,YAAY,GACvB,CACH;QACD,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CACjB,KAAC,QAAQ,IACP,OAAO,EAAE,GAAG,CAAC,aAAa,EAAE,EAC5B,eAAe,EAAE,CAAC,KAAc,EAAE,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,gBACrD,YAAY,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,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;oCACrD,CAAC;oCAAC,OAAO,CAAU,EAAE,CAAC;wCACpB,KAAK,CAAC;4CACJ,OAAO,EAAE,aAAa;4CACtB,KAAK,EAAE,2CAA2C;4CAClD,WAAW,EACT,CAAC,YAAY,KAAK;gDAChB,CAAC,CAAC,CAAC,CAAC,OAAO;gDACX,CAAC,CAAC,gCAAgC;yCACvC,CAAC,CAAC;wCACH,OAAO;oCACT,CAAC;oCAED,KAAK,CAAC;wCACJ,KAAK,EAAE,gDAAgD;wCACvD,WAAW,EAAE,uBAAuB,aAAa,GAAG;qCACrD,CAAC,CAAC;oCACH,OAAO;gCACT,CAAC,EACD,SAAS,EAAE,iBAAiB,aAE5B,KAAC,aAAa,IAAC,SAAS,EAAE,qBAAqB,GAAI,2BAElC,EAClB,aAAa,KAAK,wBAAwB,CAAC,aAAa,IAAI,CAC3D,KAAC,IAAI,IACH,IAAI,EAAE,SAAS,aAAa,mBAAmB,EAC/C,SAAS,EAAC,sBAAsB,YAEhC,MAAC,gBAAgB,IAAC,SAAS,EAAE,iBAAiB,aAC5C,KAAC,GAAG,IAAC,SAAS,EAAE,qBAAqB,GAAI,2BACxB,GACd,CACR,IACmB,IACT,CAChB,CAAC;QACJ,CAAC;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"columns.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/columns.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAKb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,CAAC,MAAM,OAAO,GAAiD;IACnE;QACE,EAAE,EAAE,QAAQ;QACZ,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACrB,KAAC,QAAQ,IACP,OAAO,EACL,KAAK,CAAC,wBAAwB,EAAE;gBAChC,CAAC,KAAK,CAAC,yBAAyB,EAAE,IAAI,eAAe,CAAC,EAExD,eAAe,EAAE,CAAC,KAAc,EAAE,EAAE,CAClC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC,KAAK,CAAC,gBAE/B,YAAY,GACvB,CACH;QACD,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CACjB,KAAC,QAAQ,IACP,OAAO,EAAE,GAAG,CAAC,aAAa,EAAE,EAC5B,eAAe,EAAE,CAAC,KAAc,EAAE,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,gBACrD,YAAY,GACvB,CACH;QACD,aAAa,EAAE,KAAK;QACpB,YAAY,EAAE,KAAK;KACpB;IACD;QACE,EAAE,EAAE,eAAe;QACnB,WAAW,EAAE,eAAe;QAC5B,MAAM,EAAE,eAAe;KACxB;IACD;QACE,EAAE,EAAE,iBAAiB;QACrB,WAAW,EAAE,iBAAiB;QAC9B,MAAM,EAAE,iBAAiB;KAC1B;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,WAAW,EAAE,wBAAwB;QACrC,MAAM,EAAE,aAAa;KACtB;IACD;QACE,EAAE,EAAE,uBAAuB;QAC3B,WAAW,EAAE,uBAAuB;QACpC,MAAM,EAAE,oBAAoB;KAC7B;IACD;QACE,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,EAAgB,EAAE;YAC9B,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC;YACzB,OAAO,KAAC,mBAAmB,IAAC,GAAG,EAAE,GAAG,GAAI,CAAC;QAC3C,CAAC;KACF;CACF,CAAC"}
@@ -1,3 +1,6 @@
1
- export { ApiServersTable } from './ApiServersTable';
2
- export type { ApiServersDatatableProps } from './ApiServersTable';
3
- export type { PreloadedApiServersTableData } from './preloaded_api_servers_table_data';
1
+ export { ApiServersTable, ApiServersTable as default } from "./ApiServersTable";
2
+ export type { ApiServersDatatableProps } from "./ApiServersTable";
3
+ export type { PreloadedApiServersTableData } from "./preloaded_api_servers_table_data";
4
+ export { clearUseApiServersCache, useApiServersList, } from "./useApiServersList";
5
+ export { ApiServersTableConfigContext } from "./ApiServersTableConfigContext";
6
+ export type { ApiServersTableConfig } from "./ApiServersTableConfigContext";
@@ -1,2 +1,4 @@
1
- export { ApiServersTable } from './ApiServersTable';
1
+ export { ApiServersTable, ApiServersTable as default } from "./ApiServersTable";
2
+ export { clearUseApiServersCache, useApiServersList, } from "./useApiServersList";
3
+ export { ApiServersTableConfigContext } from "./ApiServersTableConfigContext";
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIhF,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
@@ -1,14 +1,12 @@
1
- import { useToast } from "@schemavaults/ui";
2
1
  import { useSWRConfig } from "swr";
3
2
  import { type ListApiServersQueryType, type SchemaVaultsApiServerDefinition } from "@schemavaults/app-definitions";
4
3
  export interface UseApiServersListOptions {
5
4
  queryType: ListApiServersQueryType;
6
- toast: ReturnType<typeof useToast>["toast"];
7
5
  initialData?: readonly SchemaVaultsApiServerDefinition[] | undefined;
8
6
  organization_id?: string;
9
7
  }
10
8
  export declare function clearUseApiServersCache(mutate: ReturnType<typeof useSWRConfig>["mutate"]): void;
11
- export declare function useApiServersList({ toast, queryType, initialData, organization_id, }: UseApiServersListOptions): import("swr").SWRResponse<readonly {
9
+ export declare function useApiServersList({ queryType, initialData, organization_id, }: UseApiServersListOptions): import("swr").SWRResponse<readonly {
12
10
  api_server_id: string;
13
11
  api_server_name: string;
14
12
  api_server_description: string;
@@ -27,3 +25,4 @@ export declare function useApiServersList({ toast, queryType, initialData, organ
27
25
  owner_organization_id?: string | null | undefined;
28
26
  }[] | undefined;
29
27
  }>;
28
+ export default useApiServersList;
@@ -1,6 +1,6 @@
1
- import { useAppEnvironment, useAuth, } from "@schemavaults/auth-react-provider";
1
+ import { useAppEnvironment, } from "@schemavaults/auth-react-provider";
2
+ import { useToast } from "@schemavaults/ui";
2
3
  import useSWR from "swr";
3
- import { SCHEMAVAULTS_AUTH_APP_DEFINITION, } from "@schemavaults/app-definitions";
4
4
  function getApiServersListEndpoint(queryType, organization_id) {
5
5
  const searchParams = new URLSearchParams();
6
6
  searchParams.set("list_apis_query_type", queryType);
@@ -14,47 +14,11 @@ export function clearUseApiServersCache(mutate) {
14
14
  revalidate: true,
15
15
  });
16
16
  }
17
- export function useApiServersList({ toast, queryType, initialData, organization_id, }) {
18
- const auth = useAuth();
17
+ export function useApiServersList({ queryType, initialData, organization_id, }) {
18
+ const { toast } = useToast();
19
19
  const environment = useAppEnvironment();
20
20
  const endpoint = getApiServersListEndpoint(queryType, organization_id);
21
21
  return useSWR(endpoint, async () => {
22
- if (!auth.ready) {
23
- toast({
24
- variant: "destructive",
25
- title: "Auth client not ready",
26
- description: "Unable to acquire access token to list API servers",
27
- });
28
- throw new Error("Auth client not ready");
29
- }
30
- const authClient = auth.client.current;
31
- if (!authClient) {
32
- toast({
33
- variant: "destructive",
34
- title: "Auth client not ready",
35
- description: "Unable to acquire access token to list API servers",
36
- });
37
- throw new Error("Auth client not ready");
38
- }
39
- let auth_access_jwt;
40
- try {
41
- const auth_jwt = await authClient.acquireAccessToken({
42
- token_id: SCHEMAVAULTS_AUTH_APP_DEFINITION.app_id,
43
- audience: SCHEMAVAULTS_AUTH_APP_DEFINITION.app_id,
44
- });
45
- if (!auth_jwt)
46
- throw new Error("Failed to acquire auth access token");
47
- auth_access_jwt = auth_jwt;
48
- }
49
- catch (e) {
50
- console.error("[useApiServersList] ", e);
51
- toast({
52
- variant: "destructive",
53
- title: "Error loading authentication access token",
54
- description: e instanceof Error ? e.message : `Failed to prepare network request`,
55
- });
56
- throw e;
57
- }
58
22
  try {
59
23
  const origin = window.location.origin;
60
24
  if (environment !== "development" && environment !== "test") {
@@ -64,15 +28,13 @@ export function useApiServersList({ toast, queryType, initialData, organization_
64
28
  if (environment === "development") {
65
29
  console.log(`[useApiServersList] Sending request to endpoint "${endpoint}" from origin "${origin}"`);
66
30
  }
67
- const listAppsResponse = await fetch(endpoint, {
68
- headers: new Headers({
69
- Authorization: `Bearer ${auth_access_jwt.token}`,
70
- }),
31
+ const listApiServersResponse = await fetch(endpoint, {
71
32
  method: "GET",
33
+ credentials: "include",
72
34
  });
73
- if (!listAppsResponse.ok || listAppsResponse.status !== 200)
35
+ if (!listApiServersResponse.ok || listApiServersResponse.status !== 200)
74
36
  throw new Error("Network request to list-apps endpoint failed");
75
- const listAppsBody = await listAppsResponse.json();
37
+ const listAppsBody = await listApiServersResponse.json();
76
38
  if (typeof listAppsBody !== "object")
77
39
  throw new Error("Failed to list API servers; response not an object");
78
40
  const listAppsResponseObject = listAppsBody;
@@ -80,7 +42,11 @@ export function useApiServersList({ toast, queryType, initialData, organization_
80
42
  !listAppsResponseObject.success) {
81
43
  throw new Error("List API servers response has success = false");
82
44
  }
83
- return listAppsResponseObject.list;
45
+ const apiServersList = listAppsResponseObject.list;
46
+ if (environment === "development") {
47
+ console.log("[useApiServersList] Received list of API servers: ", apiServersList);
48
+ }
49
+ return apiServersList;
84
50
  }
85
51
  catch (error) {
86
52
  toast({
@@ -94,4 +60,5 @@ export function useApiServersList({ toast, queryType, initialData, organization_
94
60
  fallbackData: initialData ? [...initialData] : undefined,
95
61
  });
96
62
  }
63
+ export default useApiServersList;
97
64
  //# sourceMappingURL=useApiServersList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useApiServersList.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/useApiServersList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,OAAO,GAER,MAAM,mCAAmC,CAAC;AAE3C,OAAO,MAAwB,MAAM,KAAK,CAAC;AAE3C,OAAO,EAGL,gCAAgC,GAEjC,MAAM,+BAA+B,CAAC;AASvC,SAAS,yBAAyB,CAChC,SAAkC,EAClC,eAAwB;IAExB,MAAM,YAAY,GAAG,IAAI,eAAe,EAAE,CAAC;IAC3C,YAAY,CAAC,GAAG,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC;IACpD,IAAI,SAAS,KAAK,KAAK,IAAI,eAAe,EAAE,CAAC;QAC3C,YAAY,CAAC,GAAG,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,aAAa,YAAY,CAAC,QAAQ,EAAE,EAAW,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,MAAiD;IAEjD,MAAM,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE;QAC9D,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,EAChC,KAAK,EACL,SAAS,EACT,WAAW,EACX,eAAe,GACU;IACzB,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,WAAW,GAA+B,iBAAiB,EAAE,CAAC;IAEpE,MAAM,QAAQ,GAAG,yBAAyB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IAEvE,OAAO,MAAM,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;QACjC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,KAAK,CAAC;gBACJ,OAAO,EAAE,aAAa;gBACtB,KAAK,EAAE,uBAAuB;gBAC9B,WAAW,EAAE,oDAAoD;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AAG,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;KACzD,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"useApiServersList.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/useApiServersList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,GAElB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,MAAwB,MAAM,KAAK,CAAC;AAa3C,SAAS,yBAAyB,CAChC,SAAkC,EAClC,eAAwB;IAExB,MAAM,YAAY,GAAG,IAAI,eAAe,EAAE,CAAC;IAC3C,YAAY,CAAC,GAAG,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC;IACpD,IAAI,SAAS,KAAK,KAAK,IAAI,eAAe,EAAE,CAAC;QAC3C,YAAY,CAAC,GAAG,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,aAAa,YAAY,CAAC,QAAQ,EAAE,EAAW,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,MAAiD;IAEjD,MAAM,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE;QAC9D,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,EAChC,SAAS,EACT,WAAW,EACX,eAAe,GACU;IACzB,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,WAAW,GAA+B,iBAAiB,EAAE,CAAC;IACpE,MAAM,QAAQ,GAAG,yBAAyB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IAEvE,OAAO,MAAM,CACX,QAAQ,EACR,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;YACt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mCAAmC;gBAC1C,WAAW,EAAE,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,4BAA4B,EAAE;aACxF,CAAC,CAAC;YACH,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,EACD;QACE,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;KACzD,CACF,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ReactElement } from "react";
1
+ import { type ReactElement } from "react";
2
2
  import { type PreloadedAppsTableDataWithDomainRefs } from "../AppsTable";
3
3
  import type { ListAppsQueryType } from "@schemavaults/app-definitions";
4
4
  export interface AppsCardProps {
@@ -8,5 +8,7 @@ export interface AppsCardProps {
8
8
  queryType: ListAppsQueryType;
9
9
  preloaded?: PreloadedAppsTableDataWithDomainRefs;
10
10
  organization_id?: string;
11
+ uuid: () => string;
11
12
  }
12
13
  export declare function AppsCard(props: AppsCardProps): ReactElement;
14
+ export default AppsCard;