@kelpie/ui 0.14.0 → 0.16.0
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/api/client.d.ts +5 -4
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +34 -7
- package/dist/api/client.js.map +1 -1
- package/dist/api/resource.d.ts +4 -4
- package/dist/api/resource.d.ts.map +1 -1
- package/dist/api/resource.js +4 -5
- package/dist/api/resource.js.map +1 -1
- package/dist/api/resources/members.d.ts +2 -2
- package/dist/api/resources/oauth.d.ts +21 -0
- package/dist/api/resources/oauth.d.ts.map +1 -0
- package/dist/api/resources/oauth.js +74 -0
- package/dist/api/resources/oauth.js.map +1 -0
- package/dist/api/resources/planItems.d.ts +1 -1
- package/dist/api/resources/planItems.d.ts.map +1 -1
- package/dist/api/resources/planItems.js +1 -1
- package/dist/api/resources/planItems.js.map +1 -1
- package/dist/api/resources/session.d.ts +1 -1
- package/dist/api/resources/session.js +1 -1
- package/dist/app/KelpieApp.d.ts.map +1 -1
- package/dist/app/KelpieApp.js +3 -1
- package/dist/app/KelpieApp.js.map +1 -1
- package/dist/components/ApiKeysPanel.d.ts.map +1 -1
- package/dist/components/ApiKeysPanel.js +4 -1
- package/dist/components/ApiKeysPanel.js.map +1 -1
- package/dist/components/Paginator.d.ts +1 -1
- package/dist/components/QueryState.js +7 -1
- package/dist/components/QueryState.js.map +1 -1
- package/dist/components/Shell.js +1 -1
- package/dist/components/SummaryBlock.d.ts +1 -1
- package/dist/components/SummaryBlock.js +1 -1
- package/dist/lib/mcpConfig.d.ts +10 -0
- package/dist/lib/mcpConfig.d.ts.map +1 -0
- package/dist/lib/mcpConfig.js +23 -0
- package/dist/lib/mcpConfig.js.map +1 -0
- package/dist/lib/money.d.ts +2 -2
- package/dist/lib/money.js +2 -2
- package/dist/pages/DealsPage.js +1 -1
- package/dist/pages/DealsPage.js.map +1 -1
- package/dist/pages/DecisionsPage.d.ts.map +1 -1
- package/dist/pages/DecisionsPage.js +5 -3
- package/dist/pages/DecisionsPage.js.map +1 -1
- package/dist/pages/FundraisingPage.js +1 -1
- package/dist/pages/FundraisingPage.js.map +1 -1
- package/dist/pages/OpportunitiesPage.js +1 -1
- package/dist/pages/OpportunitiesPage.js.map +1 -1
- package/dist/pages/PartnershipsPage.js +1 -1
- package/dist/pages/PartnershipsPage.js.map +1 -1
- package/dist/pages/PersonDetail.js +2 -2
- package/dist/pages/PersonDetail.js.map +1 -1
- package/dist/pages/account/AccountLayout.d.ts.map +1 -1
- package/dist/pages/account/AccountLayout.js +2 -1
- package/dist/pages/account/AccountLayout.js.map +1 -1
- package/dist/pages/account/ConnectedAppsPage.d.ts +7 -0
- package/dist/pages/account/ConnectedAppsPage.d.ts.map +1 -0
- package/dist/pages/account/ConnectedAppsPage.js +32 -0
- package/dist/pages/account/ConnectedAppsPage.js.map +1 -0
- package/dist/pages/admin/McpPage.d.ts.map +1 -1
- package/dist/pages/admin/McpPage.js +6 -14
- package/dist/pages/admin/McpPage.js.map +1 -1
- package/dist/pages/admin/ModulesPage.d.ts.map +1 -1
- package/dist/pages/admin/ModulesPage.js +5 -4
- package/dist/pages/admin/ModulesPage.js.map +1 -1
- package/dist/pages/auth/AuthLayout.d.ts +1 -1
- package/dist/pages/auth/AuthLayout.d.ts.map +1 -1
- package/dist/pages/auth/AuthLayout.js +1 -1
- package/dist/pages/auth/AuthLayout.js.map +1 -1
- package/dist/pages/auth/SignUpPage.d.ts +1 -1
- package/dist/pages/auth/SignUpPage.js +1 -1
- package/dist/pages/dashboard/DashboardPage.d.ts.map +1 -1
- package/dist/pages/dashboard/DashboardPage.js +14 -1
- package/dist/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/pages/dashboard/sections.d.ts.map +1 -1
- package/dist/pages/dashboard/sections.js +12 -4
- package/dist/pages/dashboard/sections.js.map +1 -1
- package/dist/pages/forms/SubmissionDetail.js +1 -1
- package/dist/pages/forms/SubmissionDetail.js.map +1 -1
- package/dist/pages/forms/SubmissionsTable.d.ts.map +1 -1
- package/dist/pages/forms/SubmissionsTable.js +4 -3
- package/dist/pages/forms/SubmissionsTable.js.map +1 -1
- package/dist/pages/hiringDirectory.js +2 -2
- package/dist/pages/hiringDirectory.js.map +1 -1
- package/dist/pages/oauth/ConsentPage.d.ts +14 -0
- package/dist/pages/oauth/ConsentPage.d.ts.map +1 -0
- package/dist/pages/oauth/ConsentPage.js +87 -0
- package/dist/pages/oauth/ConsentPage.js.map +1 -0
- package/dist/pages/onboarding/onboardingModules.d.ts +1 -1
- package/dist/pages/onboarding/onboardingRerun.d.ts +1 -1
- package/dist/pages/onboarding/onboardingRerun.js +1 -1
- package/dist/pages/positionDirectory.js +2 -2
- package/dist/pages/positionDirectory.js.map +1 -1
- package/dist/registry/contributions.d.ts +1 -1
- package/dist/registry/contributions.js +1 -1
- package/dist/registry/overridable.d.ts +1 -1
- package/dist/registry/registry.d.ts +3 -3
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/registry.js +1 -1
- package/package.json +2 -2
- package/src/api/client.ts +39 -11
- package/src/api/resource.ts +6 -7
- package/src/api/resources/members.ts +2 -2
- package/src/api/resources/oauth.ts +112 -0
- package/src/api/resources/planItems.ts +1 -1
- package/src/api/resources/session.ts +1 -1
- package/src/app/KelpieApp.tsx +6 -0
- package/src/components/ApiKeysPanel.tsx +17 -0
- package/src/components/Paginator.tsx +1 -1
- package/src/components/QueryState.tsx +8 -1
- package/src/components/Shell.tsx +1 -1
- package/src/components/SummaryBlock.tsx +1 -1
- package/src/lib/mcpConfig.ts +24 -0
- package/src/lib/money.ts +2 -2
- package/src/pages/DealsPage.tsx +1 -1
- package/src/pages/DecisionsPage.tsx +5 -3
- package/src/pages/FormsPage.tsx +1 -1
- package/src/pages/FundraisingPage.tsx +1 -1
- package/src/pages/OpportunitiesPage.tsx +1 -1
- package/src/pages/PartnershipsPage.tsx +1 -1
- package/src/pages/PersonDetail.tsx +2 -2
- package/src/pages/account/AccountLayout.tsx +2 -1
- package/src/pages/account/ConnectedAppsPage.tsx +131 -0
- package/src/pages/admin/McpPage.tsx +37 -22
- package/src/pages/admin/ModulesPage.tsx +5 -4
- package/src/pages/auth/AuthLayout.tsx +1 -1
- package/src/pages/auth/SignUpPage.tsx +1 -1
- package/src/pages/dashboard/DashboardPage.tsx +28 -0
- package/src/pages/dashboard/sections.tsx +36 -12
- package/src/pages/forms/SubmissionDetail.tsx +1 -1
- package/src/pages/forms/SubmissionsTable.tsx +4 -3
- package/src/pages/hiringDirectory.ts +2 -2
- package/src/pages/oauth/ConsentPage.tsx +219 -0
- package/src/pages/onboarding/InvitesStepPage.tsx +1 -1
- package/src/pages/onboarding/onboardingModules.ts +1 -1
- package/src/pages/onboarding/onboardingRerun.ts +1 -1
- package/src/pages/positionDirectory.ts +2 -2
- package/src/registry/contributions.ts +1 -1
- package/src/registry/overridable.ts +1 -1
- package/src/registry/registry.ts +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sections.js","sourceRoot":"","sources":["../../../src/pages/dashboard/sections.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA2B,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAmC,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAoC,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAG5D;;;;;;GAMG;AAEH,wEAAwE;AACxE,MAAM,WAAW,GAA2C;IAC1D,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,IAAI;IACb,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QAAQ,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,GAC3E,IACH,KAfC,QAAQ,CAAC,EAAE,CAgBf,CACN,CAAC,GACC,GACG,IACE,CACf,CAAA;AACH,CAAC"}
|
|
@@ -15,7 +15,7 @@ import { formatDateTime } from '../../lib/dates.js';
|
|
|
15
15
|
* submission) are at hand, and so "back" returns to that form's Submissions tab
|
|
16
16
|
* rather than the forms list.
|
|
17
17
|
*/
|
|
18
|
-
/**
|
|
18
|
+
/** `?limit=` maxes out at 200 (`docs/agents/api-and-webhooks.md`). */
|
|
19
19
|
const MAX_PAGE = 200;
|
|
20
20
|
export function SubmissionDetail() {
|
|
21
21
|
const { id: formId, submissionId } = useParams();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmissionDetail.js","sourceRoot":"","sources":["../../../src/pages/forms/SubmissionDetail.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAC/D,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gCAAiC,CAAA;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAoC,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnD;;;;;;GAMG;AAEH,
|
|
1
|
+
{"version":3,"file":"SubmissionDetail.js","source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CAAC,CAC9B,eAAM,SAAS,EAAC,gBAAgB,uBAAS,CAC1C,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,6BAA6B,YAClD,IAAI,GACA,CACR,IACE,CACN,CAAA;AACH,CAAC;AAED,SAAS,YAAY,CAAC,EACpB,MAAM,GAGP;IACC,MAAM,SAAS,GACb,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,gBAAgB,CAAA;IAE1F,OAAO,eAAM,SAAS,EAAE,qCAAqC,SAAS,EAAE,YAAG,MAAM,GAAQ,CAAA;AAC3F,CAAC;AAED,SAAS,aAAa,CAAC,KAAgB,EAAE,MAA0B;IACjE,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,MAAM,CAAC,EAAE,KAAK,IAAI,MAAM,CAAA;IAC/E,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmissionsTable.d.ts","sourceRoot":"","sources":["../../../src/pages/forms/SubmissionsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAA6B,MAAM,iBAAiB,CAAA;AAItF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"SubmissionsTable.d.ts","sourceRoot":"","sources":["../../../src/pages/forms/SubmissionsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAA6B,MAAM,iBAAiB,CAAA;AAItF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AA4B7D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;IACnB,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAA;CACvD;AAED,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,qBAAqB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqGhG"}
|
|
@@ -13,15 +13,16 @@ import { formatDateTime } from '../../lib/dates.js';
|
|
|
13
13
|
* What has arrived through this form.
|
|
14
14
|
*
|
|
15
15
|
* Person and company names are joined client-side against one page each, the
|
|
16
|
-
* same way the Decisions page does it:
|
|
17
|
-
* neither list
|
|
16
|
+
* same way the Decisions page does it: the API has no include-expansion, and
|
|
17
|
+
* neither list filters on its own `?id=` (the repeatable id filters match a
|
|
18
|
+
* foreign key, not the record's id). A record past those pages is still
|
|
18
19
|
* linked, by its type rather than its name, which beats a raw id.
|
|
19
20
|
*
|
|
20
21
|
* A row opens `/forms/:id/submissions/:submissionId`. Inline person/company
|
|
21
22
|
* links still navigate, and stop the row click so opening a person does not
|
|
22
23
|
* also open the submission.
|
|
23
24
|
*/
|
|
24
|
-
/**
|
|
25
|
+
/** `?limit=` maxes out at 200 (`docs/agents/api-and-webhooks.md`). */
|
|
25
26
|
const MAX_PAGE = 200;
|
|
26
27
|
export function SubmissionsTable({ form, submissions }) {
|
|
27
28
|
const navigate = useNavigate();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmissionsTable.js","sourceRoot":"","sources":["../../../src/pages/forms/SubmissionsTable.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,IA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EAAE,CAAC,IAAI,KAAK,SAAS,CAAC;SACpD,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAEd,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACrD,CAAC"}
|
|
@@ -7,11 +7,11 @@ import { useRoles } from '../api/resources/roles.js';
|
|
|
7
7
|
* The counts and names the hiring pages need beside their own records.
|
|
8
8
|
*
|
|
9
9
|
* A candidacy carries two ids and no words, so every page showing one needs a
|
|
10
|
-
* second resource to render it.
|
|
10
|
+
* second resource to render it. The API has no include-expansion; it has
|
|
11
11
|
* repeatable id filters, so each of these asks about exactly the rows on screen:
|
|
12
12
|
* one extra request for the page rather than one per row.
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
14
|
+
/** `?limit=` and an id filter both max out at 200 (`docs/agents/api-and-webhooks.md`). */
|
|
15
15
|
const MAX_PAGE = 200;
|
|
16
16
|
export function useRoleCandidateCounts(roleIds) {
|
|
17
17
|
const candidates = useCandidates({ roleIds, limit: MAX_PAGE }, { enabled: roleIds.length > 0 });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hiringDirectory.js","sourceRoot":"","sources":["../../src/pages/hiringDirectory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAEpD;;;;;;;GAOG;AAEH,
|
|
1
|
+
{"version":3,"file":"hiringDirectory.js","sourceRoot":"","sources":["../../src/pages/hiringDirectory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OA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C,GAAG,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;AACpF,CAAC;AAOD;;;;;;GAMG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;IAE7C,MAAM,QAAQ,GAAG,OAAO,CACtB,GAAG,EAAE,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EACvE,CAAC,MAAM,CAAC,OAAO,CAAC,CACjB,CAAA;IAED,OAAO,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAA;AACvF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where an MCP client sends a person to approve a connection:
|
|
3
|
+
* `/consent/:requestId`, reached by redirect from `/oauth/authorize`.
|
|
4
|
+
*
|
|
5
|
+
* Outside the session gate, like `/join`: a signed-out person is sent to sign
|
|
6
|
+
* in and brought back here, rather than landing on the dashboard with the
|
|
7
|
+
* request lost.
|
|
8
|
+
*
|
|
9
|
+
* The page shows the client's host as well as its name. A name is whatever the
|
|
10
|
+
* client registered; the host is where the browser will be sent, and is the
|
|
11
|
+
* part a person can check.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ConsentPage(): React.JSX.Element;
|
|
14
|
+
//# sourceMappingURL=ConsentPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConsentPage.d.ts","sourceRoot":"","sources":["../../../src/pages/oauth/ConsentPage.tsx"],"names":[],"mappings":"AAUA;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAuB/C"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { API_KEY_SCOPE_LABELS } from '@kelpie/schemas';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Link, Navigate, useParams } from 'react-router';
|
|
5
|
+
import { useApproveOAuthRequest, useDenyOAuthRequest, useOAuthRequest } from '../../api/resources/oauth.js';
|
|
6
|
+
import { useSession } from '../../api/resources/session.js';
|
|
7
|
+
import { ErrorPanel, LoadingPanel } from '../../components/QueryState.js';
|
|
8
|
+
import { AuthLayout } from '../auth/AuthLayout.js';
|
|
9
|
+
/**
|
|
10
|
+
* Where an MCP client sends a person to approve a connection:
|
|
11
|
+
* `/consent/:requestId`, reached by redirect from `/oauth/authorize`.
|
|
12
|
+
*
|
|
13
|
+
* Outside the session gate, like `/join`: a signed-out person is sent to sign
|
|
14
|
+
* in and brought back here, rather than landing on the dashboard with the
|
|
15
|
+
* request lost.
|
|
16
|
+
*
|
|
17
|
+
* The page shows the client's host as well as its name. A name is whatever the
|
|
18
|
+
* client registered; the host is where the browser will be sent, and is the
|
|
19
|
+
* part a person can check.
|
|
20
|
+
*/
|
|
21
|
+
export function ConsentPage() {
|
|
22
|
+
const { requestId = '' } = useParams();
|
|
23
|
+
const { isLoading: sessionLoading, isSignedOut, error: sessionError } = useSession();
|
|
24
|
+
if (isSignedOut) {
|
|
25
|
+
return _jsx(Navigate, { to: `/login?next=${encodeURIComponent(`/consent/${requestId}`)}`, replace: true });
|
|
26
|
+
}
|
|
27
|
+
if (sessionError !== null) {
|
|
28
|
+
return (_jsx(AuthLayout, { title: "Connect an app", children: _jsx("div", { className: "mt-4", children: _jsx(ErrorPanel, { error: sessionError }) }) }));
|
|
29
|
+
}
|
|
30
|
+
if (sessionLoading) {
|
|
31
|
+
return _jsx(LoadingPanel, {});
|
|
32
|
+
}
|
|
33
|
+
return _jsx(ConsentForRequest, { requestId: requestId });
|
|
34
|
+
}
|
|
35
|
+
function ConsentForRequest({ requestId }) {
|
|
36
|
+
const { request, isLoading, error } = useOAuthRequest(requestId);
|
|
37
|
+
if (error !== null) {
|
|
38
|
+
return (_jsx(AuthLayout, { title: "This request is no longer valid", description: "It has expired, or it was already answered. Go back to the app and connect again.", children: _jsx("div", { className: "mt-4", children: _jsx(ErrorPanel, { error: error }) }) }));
|
|
39
|
+
}
|
|
40
|
+
if (isLoading || request === undefined) {
|
|
41
|
+
return _jsx(LoadingPanel, { label: "Loading the request\u2026" });
|
|
42
|
+
}
|
|
43
|
+
return _jsx(ConsentForm, { request: request });
|
|
44
|
+
}
|
|
45
|
+
function ConsentForm({ request }) {
|
|
46
|
+
const approve = useApproveOAuthRequest();
|
|
47
|
+
const deny = useDenyOAuthRequest();
|
|
48
|
+
const [workspaceId, setWorkspaceId] = useState(request.workspaces[0]?.id ?? '');
|
|
49
|
+
const [scopes, setScopes] = useState(request.scopes);
|
|
50
|
+
const [leaving, setLeaving] = useState(false);
|
|
51
|
+
const busy = approve.isPending || deny.isPending || leaving;
|
|
52
|
+
function leaveTo(url) {
|
|
53
|
+
// The redirect goes to the client, which may be another site or an app on
|
|
54
|
+
// this computer, so it is a full navigation and not a router one.
|
|
55
|
+
setLeaving(true);
|
|
56
|
+
window.location.assign(url);
|
|
57
|
+
}
|
|
58
|
+
function toggle(scope) {
|
|
59
|
+
setScopes((current) => (current.includes(scope) ? current.filter((entry) => entry !== scope) : [...current, scope]));
|
|
60
|
+
}
|
|
61
|
+
if (request.workspaces.length === 0) {
|
|
62
|
+
return (_jsx(AuthLayout, { title: `Connect ${request.clientName}`, description: "A connection is made to one workspace, and this account is not a member of any.", children: _jsxs("p", { className: "mt-4 text-[13px] text-ink-muted", children: [_jsx(Link, { to: "/onboarding/workspace", className: "text-accent hover:underline", children: "Create a workspace" }), ", then go back to the app and connect again."] }) }));
|
|
63
|
+
}
|
|
64
|
+
if (leaving) {
|
|
65
|
+
return (_jsx(AuthLayout, { title: "Returning to the app", description: `Sending you back to ${request.clientHost}.`, children: _jsx("p", { className: "mt-4 text-[13px] text-ink-muted", children: "You can close this tab if it does not move on." }) }));
|
|
66
|
+
}
|
|
67
|
+
return (_jsx(AuthLayout, { title: `Connect ${request.clientName}`, description: "This app wants to use Kelpie as you, through MCP.", footer: _jsx("p", { className: "text-[11px] text-ink-faint", children: "Remove the connection at any time under Account, Connected apps." }), children: _jsxs("div", { className: "mt-5 space-y-4", children: [_jsxs("div", { className: "rounded-md border border-border bg-surface px-3 py-2.5", children: [_jsx("p", { className: "text-[11px] font-medium tracking-wide text-ink-muted uppercase", children: "Sends you back to" }), _jsx("p", { className: "mt-0.5 font-mono text-[13px] break-all text-ink", children: request.clientHost }), request.clientUri !== null && (_jsx("a", { href: request.clientUri, target: "_blank", rel: "noreferrer", className: "mt-1 inline-block text-[12px] text-accent hover:underline", children: "About this app" }))] }), _jsxs("label", { className: "block", children: [_jsx("span", { className: "mb-1.5 block text-[12px] font-medium text-ink", children: "Workspace" }), _jsx("select", { value: workspaceId, onChange: (event) => {
|
|
68
|
+
setWorkspaceId(event.target.value);
|
|
69
|
+
}, className: "w-full rounded-md border border-border bg-surface px-3 py-2 text-[13px] text-ink outline-none focus:border-accent", children: request.workspaces.map((workspace) => (_jsx("option", { value: workspace.id, children: workspace.name }, workspace.id))) }), _jsx("span", { className: "mt-1 block text-[11px] text-ink-faint", children: "The app sees this workspace only. To use another, connect again." })] }), _jsxs("fieldset", { children: [_jsx("legend", { className: "mb-1.5 text-[12px] font-medium text-ink", children: "Access" }), _jsx("div", { className: "space-y-1.5", children: request.scopes.map((scope) => (_jsxs("label", { className: "flex items-center gap-2 text-[13px] text-ink", children: [_jsx("input", { type: "checkbox", checked: scopes.includes(scope), onChange: () => {
|
|
70
|
+
toggle(scope);
|
|
71
|
+
} }), API_KEY_SCOPE_LABELS[scope]] }, scope))) }), _jsx("p", { className: "mt-1.5 text-[11px] text-ink-faint", children: "The app can do no more than your own role allows. Clear an item to give less access." })] }), approve.error !== null && _jsx(ErrorPanel, { error: approve.error }), deny.error !== null && _jsx(ErrorPanel, { error: deny.error }), _jsxs("div", { className: "flex gap-2", children: [_jsx("button", { type: "button", disabled: busy, onClick: () => {
|
|
72
|
+
deny
|
|
73
|
+
.runAsync(request.id)
|
|
74
|
+
.then((decision) => {
|
|
75
|
+
leaveTo(decision.redirectUrl);
|
|
76
|
+
})
|
|
77
|
+
.catch(() => undefined);
|
|
78
|
+
}, className: "flex-1 rounded-md border border-border px-3.5 py-2 text-[12px] font-semibold text-ink transition hover:border-border-strong disabled:opacity-50", children: "Deny" }), _jsx("button", { type: "button", disabled: busy || scopes.length === 0 || workspaceId.length === 0, onClick: () => {
|
|
79
|
+
approve
|
|
80
|
+
.runAsync({ requestId: request.id, workspaceId, scopes })
|
|
81
|
+
.then((decision) => {
|
|
82
|
+
leaveTo(decision.redirectUrl);
|
|
83
|
+
})
|
|
84
|
+
.catch(() => undefined);
|
|
85
|
+
}, className: "flex-1 rounded-md bg-accent px-3.5 py-2 text-[12px] font-semibold text-accent-fg transition hover:bg-accent-hover disabled:opacity-50", children: approve.isPending ? 'Connecting…' : 'Allow' })] })] }) }));
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=ConsentPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConsentPage.js","sourceRoot":"","sources":["../../../src/pages/oauth/ConsentPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExD,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC3G,OAAO,EAAE,UAAU,EAAE,MAAM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CAAC,CAAA;4BAC3B,CAAC,EACD,SAAS,EAAC,iJAAiJ,qBAGpJ,EACT,iBACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,IAAI,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EACjE,OAAO,EAAE,GAAG,EAAE;gCACZ,OAAO;qCACJ,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;qCACxD,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;oCACjB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;gCAC/B,CAAC,CAAC;qCACD,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;4BAC3B,CAAC,EACD,SAAS,EAAC,uIAAuI,YAEhJ,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,GACrC,IACL,IACF,GACK,CACd,CAAA;AACH,CAAC"}
|
|
@@ -7,7 +7,7 @@ import type { OrganisationChoiceId } from './handbookTemplates.ts';
|
|
|
7
7
|
* what writes the first `workspace_module_settings` rows for these six.
|
|
8
8
|
*
|
|
9
9
|
* Labels stay the domain names. Defaults and explanations follow the
|
|
10
|
-
* organisation type chosen on the previous step (`
|
|
10
|
+
* organisation type chosen on the previous step (`docs/guides/getting-started.md`).
|
|
11
11
|
*/
|
|
12
12
|
export type OnboardingModuleId = 'deals' | 'opportunities' | 'raises' | 'partnerships' | 'events' | 'forms';
|
|
13
13
|
export interface OnboardingModuleChoice {
|
|
@@ -15,7 +15,7 @@ export declare function isOnboardingRerun(searchParams: URLSearchParams): boolea
|
|
|
15
15
|
/**
|
|
16
16
|
* Keep the rerun flag and the organisation type when moving between onboarding
|
|
17
17
|
* routes. `org` is how the modules step knows which defaults to offer; nothing
|
|
18
|
-
* else is held in the browser
|
|
18
|
+
* else is held in the browser.
|
|
19
19
|
*/
|
|
20
20
|
export declare function onboardingPath(path: string, rerun: boolean, org?: string | null): string;
|
|
21
21
|
//# sourceMappingURL=onboardingRerun.d.ts.map
|
|
@@ -17,7 +17,7 @@ export function isOnboardingRerun(searchParams) {
|
|
|
17
17
|
/**
|
|
18
18
|
* Keep the rerun flag and the organisation type when moving between onboarding
|
|
19
19
|
* routes. `org` is how the modules step knows which defaults to offer; nothing
|
|
20
|
-
* else is held in the browser
|
|
20
|
+
* else is held in the browser.
|
|
21
21
|
*/
|
|
22
22
|
export function onboardingPath(path, rerun, org) {
|
|
23
23
|
const params = new URLSearchParams();
|
|
@@ -5,7 +5,7 @@ import { usePositions } from '../api/resources/positions.js';
|
|
|
5
5
|
* Titles and company names for the people on screen, and head counts for the
|
|
6
6
|
* companies on screen.
|
|
7
7
|
*
|
|
8
|
-
* A list row needs data from three resources, and
|
|
8
|
+
* A list row needs data from three resources, and the API has no
|
|
9
9
|
* include-expansion. What it does have is repeatable id filters, so each of
|
|
10
10
|
* these asks about exactly the rows the page is rendering: two extra requests
|
|
11
11
|
* for the page, not one per row, and no cap that a real workspace could grow
|
|
@@ -15,7 +15,7 @@ import { usePositions } from '../api/resources/positions.js';
|
|
|
15
15
|
* omitted would answer with every record in the workspace, which is the wrong
|
|
16
16
|
* answer rather than a slow one.
|
|
17
17
|
*/
|
|
18
|
-
/**
|
|
18
|
+
/** `?limit=` and an id filter both max out at 200 (`docs/agents/api-and-webhooks.md`). */
|
|
19
19
|
const MAX_PAGE = 200;
|
|
20
20
|
export function usePeopleDirectory(personIds) {
|
|
21
21
|
const enabled = personIds.length > 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"positionDirectory.js","sourceRoot":"","sources":["../../src/pages/positionDirectory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAA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,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;QAC3E,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;IAEvB,OAAO;QACL,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC;QAC3D,SAAS,EAAE,SAAS,CAAC,SAAS;QAC9B,UAAU,EAAE,CAAC,SAAS,CAAC,OAAO;KAC/B,CAAA;AACH,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExtensibleRecordType } from '@kelpie/schemas';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
/**
|
|
4
|
-
* What a UI module may add to the shell
|
|
4
|
+
* What a UI module may add to the shell.
|
|
5
5
|
*
|
|
6
6
|
* Every slot renders nothing when empty. A core page has to look finished with
|
|
7
7
|
* no modules loaded at all, because the open-source assembly is exactly that.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* What a UI module may add to the shell
|
|
2
|
+
* What a UI module may add to the shell.
|
|
3
3
|
*
|
|
4
4
|
* Every slot renders nothing when empty. A core page has to look finished with
|
|
5
5
|
* no modules loaded at all, because the open-source assembly is exactly that.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* The override escape hatch
|
|
3
|
+
* The override escape hatch: a module replaces a core
|
|
4
4
|
* component outright. Prefer a slot; this is for the cases a slot cannot reach.
|
|
5
5
|
*
|
|
6
6
|
* A core component is replaceable only if it hands out a token, and the token
|
|
@@ -2,7 +2,7 @@ import type { ComponentType } from 'react';
|
|
|
2
2
|
import type { AuthMethod, DashboardCard, ExtensibleRecordType, NavItem, NavSlot, RecordSidebarCard, RecordTab, RouteContribution } from './contributions.ts';
|
|
3
3
|
import type { Overridable } from './overridable.ts';
|
|
4
4
|
/**
|
|
5
|
-
* The build-time UI extension registry
|
|
5
|
+
* The build-time UI extension registry.
|
|
6
6
|
*
|
|
7
7
|
* Composition is build-time, like the server runtime: an assembly lists its UI
|
|
8
8
|
* modules and this collects what they contribute. Nothing is loaded at runtime,
|
|
@@ -21,7 +21,7 @@ export interface UiModuleContext {
|
|
|
21
21
|
dashboardCard(card: DashboardCard): void;
|
|
22
22
|
/** Another way to sign in, rendered beside the password form on `/login` and `/signup`. */
|
|
23
23
|
authMethod(method: AuthMethod): void;
|
|
24
|
-
/** Replaces a core component. Prefer a slot
|
|
24
|
+
/** Replaces a core component. Prefer a slot. */
|
|
25
25
|
override<Props>(token: Overridable<Props>, component: ComponentType<Props>): void;
|
|
26
26
|
}
|
|
27
27
|
export interface UiModule {
|
|
@@ -63,7 +63,7 @@ export declare function registerUiModules(modules: readonly UiModule[]): UiExten
|
|
|
63
63
|
* tree without a provider sees.
|
|
64
64
|
*
|
|
65
65
|
* Every slot is empty and every overridable renders its core fallback, which is
|
|
66
|
-
* the state
|
|
66
|
+
* the state core pages are required to look finished in.
|
|
67
67
|
*/
|
|
68
68
|
export declare const NO_UI_MODULES: UiExtensions;
|
|
69
69
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/registry/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EAClB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,kBAAkB,CAAA;AAElE;;;;;;;;;;;GAWG;A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7 +106,7 @@ export function registerUiModules(modules) {
|
|
|
106
106
|
* tree without a provider sees.
|
|
107
107
|
*
|
|
108
108
|
* Every slot is empty and every overridable renders its core fallback, which is
|
|
109
|
-
* the state
|
|
109
|
+
* the state core pages are required to look finished in.
|
|
110
110
|
*/
|
|
111
111
|
export const NO_UI_MODULES = registerUiModules([]);
|
|
112
112
|
//# sourceMappingURL=registry.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kelpie/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "React UI for Kelpie: components, pages, API client, and the extension registry an assembly composes modules through.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kelpie",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@dnd-kit/core": "^6.3.1",
|
|
49
49
|
"@dnd-kit/sortable": "^10.0.0",
|
|
50
50
|
"@dnd-kit/utilities": "^3.2.2",
|
|
51
|
-
"@kelpie/schemas": "^0.
|
|
51
|
+
"@kelpie/schemas": "^0.16.0",
|
|
52
52
|
"@tanstack/react-query": "^5.101.4",
|
|
53
53
|
"react-markdown": "^10.1.0",
|
|
54
54
|
"react-router": "^8.3.0",
|
package/src/api/client.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Client for the public `/v1` API. The UI is one more API consumer, exactly like
|
|
3
|
-
* an agent, so this file encodes only what
|
|
3
|
+
* an agent, so this file encodes only what the API documents: the list envelope,
|
|
4
4
|
* the error shape, and the write verbs.
|
|
5
5
|
*
|
|
6
6
|
* Responses are untrusted input. Every method takes a `Decoder` and returns what
|
|
@@ -40,7 +40,7 @@ export class ApiError extends Error {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
/** A cursor page: `{ data, next_cursor }` from `api.md`. */
|
|
43
|
+
/** A cursor page: `{ data, next_cursor }` from `docs/agents/api-and-webhooks.md`. */
|
|
44
44
|
export interface Page<T> {
|
|
45
45
|
readonly items: readonly T[]
|
|
46
46
|
readonly nextCursor: string | null
|
|
@@ -48,7 +48,8 @@ export interface Page<T> {
|
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Query string values. An array becomes a repeated parameter, which is how
|
|
51
|
-
*
|
|
51
|
+
* the API names a set of ids: `?person_id=per_1&person_id=per_2`
|
|
52
|
+
* (`docs/agents/api-and-webhooks.md`).
|
|
52
53
|
*/
|
|
53
54
|
export type QueryParameters = Readonly<
|
|
54
55
|
Record<string, string | number | boolean | readonly string[] | undefined>
|
|
@@ -78,7 +79,7 @@ export interface ApiClient {
|
|
|
78
79
|
*/
|
|
79
80
|
postForm<T>(path: string, form: FormData, decode: Decoder<T>): Promise<T>
|
|
80
81
|
/**
|
|
81
|
-
* A `POST` whose success carries no body.
|
|
82
|
+
* A `POST` whose success carries no body. Resource writes return
|
|
82
83
|
* the resulting object, but the session endpoints have nothing to return:
|
|
83
84
|
* logout answers `204`, and a password reset request answers `202`.
|
|
84
85
|
*/
|
|
@@ -128,9 +129,16 @@ function buildUrl(baseUrl: string, path: string, query: QueryParameters | undefi
|
|
|
128
129
|
* Turns a failed response into an `ApiError`. A body that does not match the
|
|
129
130
|
* documented error shape still produces an error carrying the HTTP status,
|
|
130
131
|
* because the alternative is a rejected promise with no cause.
|
|
132
|
+
*
|
|
133
|
+
* `502`, `503` and `504` from a dev or reverse proxy mean the API itself is
|
|
134
|
+
* down, so they get a friendly `service_unreachable` code that `QueryState`
|
|
135
|
+
* turns into a plain sentence instead of "HTTP 504".
|
|
131
136
|
*/
|
|
132
137
|
function readErrorBody(status: number, payload: unknown): ApiError {
|
|
133
|
-
const unreadable =
|
|
138
|
+
const unreadable =
|
|
139
|
+
status === 502 || status === 503 || status === 504
|
|
140
|
+
? new ApiError(status, 'service_unreachable', 'The service is unreachable. Try again in a moment.')
|
|
141
|
+
: new ApiError(status, 'internal_error', `Unreadable error response (HTTP ${status})`)
|
|
134
142
|
|
|
135
143
|
if (!isRecord(payload) || !isRecord(payload.error)) {
|
|
136
144
|
return unreadable
|
|
@@ -160,7 +168,21 @@ function readPage<T>(payload: unknown, decodeItem: Decoder<T>): Page<T> {
|
|
|
160
168
|
}
|
|
161
169
|
|
|
162
170
|
export function createApiClient(options: ApiClientOptions): ApiClient {
|
|
163
|
-
const
|
|
171
|
+
const rawFetch = options.fetch ?? globalThis.fetch.bind(globalThis)
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* A fetch that turns a rejection into an `ApiError`. `fetch` rejects only
|
|
175
|
+
* when the network layer failed (DNS, connection refused, offline), and the
|
|
176
|
+
* raw rejection is a `TypeError` whose message is either "Failed to fetch"
|
|
177
|
+
* or "Load failed" depending on the browser. Neither belongs in the UI.
|
|
178
|
+
*/
|
|
179
|
+
async function doFetch(url: string, init: RequestInit): Promise<Response> {
|
|
180
|
+
try {
|
|
181
|
+
return await rawFetch(url, init)
|
|
182
|
+
} catch {
|
|
183
|
+
throw new ApiError(0, 'service_unreachable', 'The service is unreachable. Check that the API is running.')
|
|
184
|
+
}
|
|
185
|
+
}
|
|
164
186
|
|
|
165
187
|
function headersFor(body: unknown): Record<string, string> {
|
|
166
188
|
return body === undefined
|
|
@@ -180,15 +202,21 @@ export function createApiClient(options: ApiClientOptions): ApiClient {
|
|
|
180
202
|
})
|
|
181
203
|
}
|
|
182
204
|
|
|
183
|
-
/**
|
|
205
|
+
/**
|
|
206
|
+
* Reads a JSON response, converting any non-2xx into an `ApiError`.
|
|
207
|
+
*
|
|
208
|
+
* The body is parsed defensively on failure: a dev proxy answering `504` with
|
|
209
|
+
* an empty body, or a reverse proxy answering `502` with an HTML page, would
|
|
210
|
+
* otherwise throw `SyntaxError: Unexpected end of JSON input` and hide the
|
|
211
|
+
* status that explains the failure.
|
|
212
|
+
*/
|
|
184
213
|
async function readJson(response: Response): Promise<unknown> {
|
|
185
|
-
const payload: unknown = await response.json()
|
|
186
|
-
|
|
187
214
|
if (!response.ok) {
|
|
215
|
+
const payload: unknown = await response.json().catch(() => null)
|
|
188
216
|
throw readErrorBody(response.status, payload)
|
|
189
217
|
}
|
|
190
218
|
|
|
191
|
-
return
|
|
219
|
+
return response.json()
|
|
192
220
|
}
|
|
193
221
|
|
|
194
222
|
async function send<T>(method: string, url: string, decode: Decoder<T>, body?: unknown): Promise<T> {
|
|
@@ -260,7 +288,7 @@ export function createApiClient(options: ApiClientOptions): ApiClient {
|
|
|
260
288
|
delete: async (path, query) => {
|
|
261
289
|
const response = await request('DELETE', buildUrl(options.baseUrl, path, query))
|
|
262
290
|
|
|
263
|
-
// Stricter than `response.ok`:
|
|
291
|
+
// Stricter than `response.ok`: a successful delete is `204`,
|
|
264
292
|
// and anything else means the server is not doing what it documents.
|
|
265
293
|
if (response.status !== 204) {
|
|
266
294
|
throw await readEmptyError(response)
|
package/src/api/resource.ts
CHANGED
|
@@ -28,7 +28,7 @@ import { toError } from './errors.ts'
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* The default page size when a caller does not name one via `query.limit`.
|
|
31
|
-
* Matches the `/v1` default
|
|
31
|
+
* Matches the `/v1` default.
|
|
32
32
|
*/
|
|
33
33
|
export const DEFAULT_PAGE_SIZE = 50
|
|
34
34
|
|
|
@@ -50,7 +50,7 @@ export interface Paged {
|
|
|
50
50
|
readonly nextPage: () => void
|
|
51
51
|
/**
|
|
52
52
|
* Changes the API `?limit=` and returns the reader to page 1. The API caps
|
|
53
|
-
* `?limit=` at 200 (`api.md`); a larger value is coerced by the server, not
|
|
53
|
+
* `?limit=` at 200 (`docs/agents/api-and-webhooks.md`); a larger value is coerced by the server, not
|
|
54
54
|
* refused by this hook.
|
|
55
55
|
*/
|
|
56
56
|
readonly setPageSize: (size: number) => void
|
|
@@ -70,7 +70,7 @@ export interface RecordResult<TRecord> {
|
|
|
70
70
|
readonly record: TRecord | undefined
|
|
71
71
|
readonly isLoading: boolean
|
|
72
72
|
readonly error: Error | null
|
|
73
|
-
/** The record is not in this workspace, which
|
|
73
|
+
/** The record is not in this workspace, which the API makes indistinguishable from not existing. */
|
|
74
74
|
readonly isNotFound: boolean
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -160,9 +160,8 @@ function keysFor(name: string): ResourceKeys {
|
|
|
160
160
|
/**
|
|
161
161
|
* Applies a partial update to a record.
|
|
162
162
|
*
|
|
163
|
-
* `undefined` means "not sent" and `null` means "clear this field",
|
|
164
|
-
*
|
|
165
|
-
* overwrite it.
|
|
163
|
+
* `undefined` means "not sent" and `null` means "clear this field", so an
|
|
164
|
+
* undefined value must leave the existing one alone rather than overwrite it.
|
|
166
165
|
*/
|
|
167
166
|
function mergeDefined<TRecord extends object>(record: TRecord, changes: Partial<TRecord>): TRecord {
|
|
168
167
|
const merged = { ...record }
|
|
@@ -235,7 +234,7 @@ export interface PagedListInput<TRecord> {
|
|
|
235
234
|
* and the three custom collections whose paths carry a parent id
|
|
236
235
|
* (`useFormSubmissions`, `useListMembers`, `useWebhookDeliveries`).
|
|
237
236
|
*
|
|
238
|
-
* The API is cursor-only
|
|
237
|
+
* The API is cursor-only, so pages are fetched forward. Already
|
|
239
238
|
* fetched pages stay cached in `useInfiniteQuery`, and `pageIndex` selects
|
|
240
239
|
* which one is on screen — so going back to a visited page is instant and
|
|
241
240
|
* going forward past the fetched set kicks off exactly one new request.
|
|
@@ -15,8 +15,8 @@ import { useSession } from './session.ts'
|
|
|
15
15
|
* endpoint answers the whole team in one page rather than a cursor list.
|
|
16
16
|
*
|
|
17
17
|
* Notes carry an `author_id` and activities an `actor_member_id`, both workspace
|
|
18
|
-
* member ids.
|
|
19
|
-
* against this list. One request per page, not one per row.
|
|
18
|
+
* member ids. The API has no include-expansion (`docs/api-reference.md`), so
|
|
19
|
+
* the panel showing them joins against this list. One request per page, not one per row.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
export interface MemberDirectory {
|